Custom fields
- added listing of custom fields in form editor - ability to delete a custom field - mades changes to the form editor in order to accomodate for the new custom fields system - fix form editor bugs - cleanup
This commit is contained in:
@ -88,10 +88,13 @@ class Subscribers {
|
||||
$errors[] = __('You need to select a list');
|
||||
}
|
||||
|
||||
$subscriber = false;
|
||||
if(!empty($errors)) {
|
||||
wp_send_json(array('errors' => $errors));
|
||||
} else {
|
||||
$subscriber = Subscriber::where('email', $data['email'])->findOne();
|
||||
if(!empty($data['email'])) {
|
||||
$subscriber = Subscriber::where('email', $data['email'])->findOne();
|
||||
}
|
||||
}
|
||||
|
||||
$signup_confirmation = Setting::getValue('signup_confirmation', array());
|
||||
@ -180,14 +183,17 @@ class Subscribers {
|
||||
? unserialize($form->settings) : null
|
||||
);
|
||||
|
||||
if($subscriber !== null && empty($errors)) {
|
||||
$result = true;
|
||||
$message = $form_settings['success_message'];
|
||||
if(!empty($errors)) {
|
||||
wp_send_json(array(
|
||||
'result' => false,
|
||||
'errors' => $errors
|
||||
));
|
||||
} else {
|
||||
$result = false;
|
||||
$result = true;
|
||||
}
|
||||
|
||||
if($form_settings !== null) {
|
||||
$message = $form_settings['success_message'];
|
||||
|
||||
// url params for non ajax requests
|
||||
if($doing_ajax === false) {
|
||||
|
Reference in New Issue
Block a user