26 $this->label = esc_html__(
'Email',
'gk-gravityview' );
27 parent::__construct();
33 unset( $field_options[
'show_as_link'] );
35 if(
'edit' === $context ) {
36 return $field_options;
39 $email_options = array(
40 'emailmailto' => array(
43 'label' => __(
'Link the Email Address',
'gk-gravityview' ),
44 'desc' => __(
'Clicking the link will generate a new email.',
'gk-gravityview' ),
47 'emailsubject' => array(
49 'label' => __(
'Email Subject',
'gk-gravityview' ),
51 'desc' => __(
'Set the default email subject line.',
'gk-gravityview' ),
52 'merge_tags' =>
'force',
53 'requires' =>
'emailmailto',
58 'label' => __(
'Email Body',
'gk-gravityview' ),
60 'desc' => __(
'Set the default email content.',
'gk-gravityview' ),
61 'merge_tags' =>
'force',
62 'class' =>
'widefat code',
63 'requires' =>
'emailmailto',
66 'emailencrypt' => array(
69 'label' => __(
'Encrypt Email Address',
'gk-gravityview' ),
70 'desc' => __(
'Make it harder for spammers to get email addresses from your entries. Email addresses will not be visible with Javascript disabled.',
'gk-gravityview' ),
71 'group' =>
'advanced',
76 return $email_options + $field_options;
Modify field settings by extending this class.
field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id)
Add custom options for email fields.
if(empty( $created_by)) $form_id
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed
new GravityView_Field_Email