Simple one i think - Default value in input field
Permalink
Hi,
I am editing a block currently and want to add a default value to each of my fields (its in the mailchimp add on and its simply 'name' and 'email' i want to add in their respective fields..
This is the code
Where and or how would I make these fields show a default value?
thanks for looking :)
I am editing a block currently and want to add a default value to each of my fields (its in the mailchimp add on and its simply 'name' and 'email' i want to add in their respective fields..
This is the code
<form action="<?php echo $this->action('signmeup')?>" method="post" id="mail_form"> <?php echo t('Your Name')?><br/> <?php echo $fm->text('fullname',$fullname,array('size'=>'32'))?><br/> <?php echo t('Email')?><br/> <?php echo $fm->text('email',$email,array('size'=>'32'))?> <?php echo $fm->hidden('id',$list)?>
Where and or how would I make these fields show a default value?
thanks for looking :)
One thing to keep in mind is that upon a validation error the user will get the default fields again instead of their previously typed in value. Not sure if that matters.
Also, the c5 site docs for forms is actually pretty good.
http://www.concrete5.org/documentation/developers/forms/standard-wi...