Form editor update

- when a custom field is updated, the matching form field is now also updated
- ability to toggle "is_required" on First name & Last name
- fixed position of validation errors on segment selection, checkbox and radio
- fixed form subscription not working when using custom fields
- fixed sortable in segment selection after list update (add/remove)
- updated position of messages in form subscription
This commit is contained in:
Jonathan Labreuille
2016-01-18 17:23:10 +01:00
parent a6d802e2fa
commit cabe2d61b7
14 changed files with 82 additions and 47 deletions

View File

@ -237,6 +237,16 @@ class Subscriber extends Model {
}
}
// custom fields
$custom_fields = array();
foreach($data as $key => $value) {
if(strpos($key, 'cf_') === 0) {
$custom_fields[substr($key, 3)] = $value;
unset($data[$key]);
}
}
if($subscriber === false) {
$subscriber = static::create();
$subscriber->hydrate($data);