login
my password
use a boolean value
allow user to config
adresse du site
use a choice choice one choice two choice three
use a radiobutton choice
email
telephone
date
time
text
number
// configuration $autoform=array( 'use_labels'=>true, 'use_placeholder'=>false, 'surrounding_object'=>'p', 'method'=>'post', 'action'=>'action_page.php', 'form_name'=>'autoform', 'form_id'=>'autoform', 'form_class'=>'autoform', 'enctype'=>'', 'submit_button_label'=>'Envoyer', 'reset_button_label' ); $autoform['use_a_choice']['list']=array('choice one','choice two','choice three');// here we define the other possible values => oh, ok : that's a select input ! $autoform['use_a_radiobutton_choice']['list']=array('choice one','choice two','choice three');// here we define the other possible values => oh, ok : that's a select input ! $autoform['use_a_radiobutton_choice']['type']='radio';// here we force the list to appear as a radiobutton list $autoform['my_password']['type']='password';// here we force the input's type to password $autoform['my_password']['required']=true; $autoform['my_password']['class']='red'; // add class .red $autoform['adresse_du_site']['type']='url';// force the type $autoform['email']['type']='email'; $autoform['login']['autofocus']=true; $autoform['telephone']['type']='tel';// force the type $autoform['date']['type']='date'; $autoform['time']['type']='time'; $autoform['text']['type']='textarea'; $autoform['number']['type']='number'; $autoform['number']['max']='100'; $autoform['number']['min']='10'; $autoform['number']['step']='10'; echo render_form($config);
If you submit this form, the changes will be stored in the config.php file
After a minute, the original data will be restored ^^
//only change $autoform['use_labels']=false; $autoform['use_placeholder']=true; $autoform['telephone']['placeholder']='please type your phone number';// change the default placeholder $autoform['email']['placeholder']='type your email';// change the default placeholder $autoform['text']['placeholder']='This is a textarea';// change the default placeholder echo render_form($config);