This is a generated form

Use labels and no placeholders

use a radiobutton choice


The code

// 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 ^^

Use placeholders instead of labels (no fallback).

use a radiobutton choice

The code


//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);