esc_html__( 'Active Campaign Integration', 'active-campaign-wpforms' ), 'form' => true, 'submit' => esc_html__( 'Save Settings', 'active-campaign-wpforms' ), ); return $tabs; } public function add_fields($defaults){ $defaults['ac-integration'] = array( 'ac-heading' => array( 'id' => 'ac-heading', 'content' => '

' . esc_html__( 'Active Campaign Settings', 'active-campaign-wpforms' ) . '

' . esc_html__( 'Add your Active Campaign API credentials here.This is a global setting area,you can also add API keys seperately for each forms.', 'active-campaign-wpforms' ) . '

', 'type' => 'content', 'no_label' => true, 'class' => array( 'section-heading' ), ), 'ac-url' => array( 'id' => 'ac-url', 'name' => esc_html__( 'Active Campaign URL', 'active-campaign-wpforms' ), 'type' => 'text', 'desc' => sprintf(esc_html__( 'You can get url from %s.', 'ac-wpforms-pro' ),'here'), ), 'ac-apikey' => array( 'id' => 'ac-apikey', 'name' => esc_html__( 'API Key', 'active-campaign-wpforms' ), 'type' => 'text', 'desc' => sprintf(esc_html__( 'You can get API key from %s.', 'ac-wpforms-pro' ),'here'), ), 'ac-listid' => array( 'id' => 'ac-listid', 'name' => esc_html__( 'List ID', 'active-campaign-wpforms' ), 'type' => 'text', 'desc' => sprintf(esc_html__( 'You can get API key from %s.', 'ac-wpforms-pro' ),'here'), ), ); return $defaults; } public function assign_ac_fields_menu($sections){ $sections['ac-integration'] = 'Active Campaign Integration'; $sections['assign-acfields'] = 'Assign Form Fields to AC'; return $sections; } public function assign_ac_fields($settings){ //AC Integration Tab echo '
'; echo '
'; esc_html_e( 'Active Campaign Integration', 'ac-wpforms-pro' ); echo '
'; echo '
This will replace the global settings.'; echo '
'; wpforms_panel_field( 'checkbox', 'ac-integration', 'enable-ac', $settings->form_data, esc_html__( 'Enable Active Campaign', 'ac-wpforms-pro' ), array( 'default' => '0', 'parent' => 'settings', 'class' => 'email-recipient', ) ); wpforms_panel_field( 'text', 'ac-integration', 'ac-url', $settings->form_data, esc_html__( 'Active Campaign URL', 'ac-wpforms-pro' ), array( 'default' => '', 'tooltip' => sprintf(esc_html__( 'You can get url from %s.', 'ac-wpforms-pro' ),'here'), 'parent' => 'settings', 'class' => 'email-recipient', ) ); wpforms_panel_field( 'text', 'ac-integration', 'ac-apikey', $settings->form_data, esc_html__( 'Active Campaign API Key', 'ac-wpforms-pro' ), array( 'default' => '', 'tooltip' => sprintf(esc_html__( 'You can get API key from %s.', 'ac-wpforms-pro' ),'here'), 'parent' => 'settings', 'class' => 'email-recipient', ) ); ?> '; echo '
'; //AC Field Assign Tab echo '
'; echo '
'; esc_html_e( 'Assign Form Fields', 'active-campaign-wpforms' ); echo '
'; $id = 1; echo '
'; wpforms_panel_field( 'text', 'assign-acfields', 'email', $settings->form_data, esc_html__( 'Email Address*', 'active-campaign-wpforms' ), array( 'default' => '', 'tooltip' => esc_html__( 'Enter the email address to save in your Active Campaign Contact Lists.You can also use the smart tags from your form fields.', 'active-campaign-wpforms' ), 'smarttags' => array( 'type' => 'fields', 'fields' => 'email', ), 'parent' => 'settings', 'class' => 'email-recipient', ) ); echo '
'; echo ''; echo esc_html__('Following fields are optional select if available in form, otherwise leave unselected. Only email field is required.','active-campaign-wpforms'); echo '
'; echo '
'; wpforms_panel_field( 'text', 'assign-acfields', 'first-name', $settings->form_data, esc_html__( 'First Name', 'active-campaign-wpforms' ), array( 'default' => '', 'tooltip' => esc_html__( 'You can use the smart tags from your form fields.', 'active-campaign-wpforms' ), 'smarttags' => array( 'type' => 'all', ), 'parent' => 'settings', 'class' => 'email-recipient', ) ); wpforms_panel_field( 'text', 'assign-acfields', 'last-name', $settings->form_data, esc_html__( 'Last Name', 'active-campaign-wpforms' ), array( 'default' => '', 'tooltip' => esc_html__( 'You can use the smart tags from your form fields.', 'active-campaign-wpforms' ), 'smarttags' => array( 'type' => 'all', ), 'parent' => 'settings', 'class' => 'email-recipient', ) ); echo ''; echo esc_html__('Note:If you have Name field containing first and last name then you can skip this Last Name field','active-campaign-wpforms'); echo'

'; wpforms_panel_field( 'text', 'assign-acfields', 'phone', $settings->form_data, esc_html__( 'Phone', 'active-campaign-wpforms' ), array( 'default' => '', 'tooltip' => esc_html__( 'You can use the smart tags from your form fields.', 'active-campaign-wpforms' ), 'smarttags' => array( 'type' => 'all', ), 'parent' => 'settings', 'class' => 'email-recipient', ) ); wpforms_panel_field( 'text', 'assign-acfields', 'organization', $settings->form_data, esc_html__( 'Organization', 'active-campaign-wpforms' ), array( 'default' => '', 'tooltip' => esc_html__( 'You can use the smart tags from your form fields.', 'active-campaign-wpforms' ), 'smarttags' => array( 'type' => 'all', ), 'parent' => 'settings', 'class' => 'email-recipient', ) ); wpforms_panel_field( 'textarea', 'assign-acfields', 'tags', $settings->form_data, esc_html__( 'Tags', 'active-campaign-wpforms' ), array( 'default' => '', 'tooltip' => esc_html__( 'You can use the smart tags from your form fields.', 'active-campaign-wpforms' ), 'smarttags' => array( 'type' => 'all', ), 'parent' => 'settings', 'class' => 'email-recipient pro-fields', ) ); ?>
'; echo '
'; } } } new Acwpf_Register_Settings();