Jump to content

PHP add values to form entry


calebm12

Recommended Posts

very new to php and i am not sure if this can even be done.  i would like to add a "default" value to the end of any value that a user enters into my form

The field is formated as this:

  $form['email_recipients'] = array(

    '#type' => 'textarea',

    '#title' => t('Send Message To'),

    '#default_value' => $node->email_recipients,

    '#cols' => 60,

    '#rows' => 6,

    '#description' => t('Use a comma or space to separate addresses. Make sure the above email addresses are valid to avoid campaign suspension.'),

    '#required' => TRUE,

  );

 

i would like for the user to enter for example just their username, and then have it automatically add @sitename.com to the value they enter once it is processed.  Is this possible?  If so, how in the world do i do it!?!?

 

many thanks

Link to comment
https://forums.phpfreaks.com/topic/176484-php-add-values-to-form-entry/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.