get_current_language(); $is_all_languages = $this->is_all_languages(); if (!$is_all_languages) { $controls->warnings[] = 'You are configuring the language "' . $current_language . '". Switch to "all languages" to see every options.'; } if (!$controls->is_action()) { $controls->data = $this->get_options('profile', $current_language); } else { if ($controls->is_action('save')) { $this->save_options($controls->data, 'profile', null, $current_language); $controls->data = $this->get_options('profile', $current_language); $controls->add_message_saved(); } if ($controls->is_action('reset')) { $controls->data = $this->reset_options('profile'); $controls->add_message_done(); } } $status = array(0 => __('Private', 'newsletter'), 1 => __('Show on profile page', 'newsletter'), 2 => __('Show on subscription form', 'newsletter')); $rules = array(0 => __('Optional', 'newsletter'), 1 => __('Required', 'newsletter')); $extra_type = array('text' => __('Text', 'newsletter'), 'select' => __('List', 'newsletter')); ?>

HTML samples and hand coded forms

init(); ?>

The main subscriber fields. Only the email field is, of course, mandatory.

Email

If you want to collect only a generic "name", use only this field and not the last name field.

Salutation titles are inserted in emails message when the tag {title} is used. For example "Good morning {title} {surname} {name}".

text('subscribe', 40); ?>

You can use an image URL (http://...).

Privacy checkbox/notice

The privacy acceptance checkbox (required in many Europen countries) forces the subscriber to check it before proceeding. If an URL is specified the label becomes a link.

Generic textual profile fields that can be collected during the subscription. Field formats can be one line text or selection list. Fields of type "list" must be configured with a set of options, comma separated like: "first option, second option, third option".

The placeholder works only on HTML 5 compliant browsers.

Field Name/Label Placeholder When/Where Type Rule List values comma separated
text('profile_' . $i); ?> text('profile_' . $i . '_placeholder'); ?> select('profile_' . $i . '_status', $status); ?> select('profile_' . $i . '_type', $extra_type); ?> select('profile_' . $i . '_rules', $rules); ?> get_value('profile_' . $i . '_status')]) ?> get_value('profile_' . $i . '_type')]) ?> get_value('profile_' . $i . '_rules')]) ?> textarea_fixed('profile_' . $i . '_options', '200px', '50px'); ?>

button_save(); ?> button_reset(); ?>