Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5381

    How can I change or delete fields on the contact form?

    #49935

    Hey,

    open up inludes/contact-form.php. You can adjust the elements array (i.e. delete elements, change labels, rename elements, add elements, etc.) and customize the contact form. Supported elements are text, textarea and decoy fields.

    $elements = array(

    'yourname' => array('type'=>'text', 'label'=>__('Name','avia_framework'), 'check'=>'is_empty'), //user name
    'email' => array('type'=>'text', 'label'=>__('E-Mail','avia_framework'), 'check'=>'is_email'), //user email
    'website' => array('type'=>'text', 'label'=>__('Website','avia_framework'), 'check'=>''), //user website
    'subject' => array('type'=>'text', 'label'=>__('Subject','avia_framework'), 'check'=>'is_empty'), //subject
    'message' => array('type'=>'textarea','label'=>__('Message','avia_framework'), 'check'=>'is_empty'), //message
    'myemail' => array('type'=>'hidden', 'label'=>'', 'check'=>'', 'value'=> avia_get_option('avia, email') ), //email adress the form should be sent to
    'myblogname'=> array('type'=>'hidden', 'label'=>'', 'check'=>'', 'value'=> get_option('blogname') ), //name of the website, gets added to the subject line
    'username' => array('type'=>'decoy', 'label'=>'', 'check'=>'must_empty'), //decoy input field for bots, input field gets hidden, if bot enters value form wont be submitted

    );

    #49936

    How would I put instruction text above the “message” field or in the message field… if it was in the message field is there a way to have the text disappear when someone clicks that field to type?

    Also, how can i rearrange how the form displays on the contact page? I want to have it before the page content, not after…

    #49937

    Since you’ve made yet another topic here I’ll answer that one.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘How do you modify fields on the Contact form?’ is closed to new replies.