Help with PHP form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
calebm12
Forum Newbie
Posts: 1
Joined: Sun Oct 04, 2009 5:36 pm

Help with PHP form

Post by calebm12 »

I am just learning php and could use some help editing this form field. I would like to add a "tag" to every entry that is put in the field prior to the value being stored.
$form['email_recipients'] = array(
'#type' => 'textarea',
'#title' => t('Send Message To'),
'#default_value' => $node->email_recipients,
'#cols' => 60,
'#rows' => 6,
'#required' => TRUE,
);

I would like to have the user filling the form have them only enter thier username, and then add a @sitename.com prior to saving it as the value in email_recipients. Is this possible?
User avatar
akuji36
Forum Contributor
Posts: 190
Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut

Re: Help with PHP form

Post by akuji36 »

Hello

Let's do away with arrays since you are new to php and start simple.

take a look at this tutorial:

http://www.tutorialized.com/view/tutori ... form/10731
Post Reply