Hey,
to do this you can do the following:
in your folder Framework>php>class-form-generator.php find :
/**
* text
*
* The text method creates input elements with type text, and prefills them with $_POST values if available.
* The method also checks against various input validation cases
* @param string $id holds the key of the element
* @param array $element data array of the element that should be created
*/
function text($id, $element)
{
$p_class = $required = $element_class = $value = "";
if(!empty($element['check']))
{
$required = "*";
$element_class = $element['check'];
$p_class = $this->check_element($id, $element);
}
if(!empty($_POST[$id])) $value = urldecode($_POST[$id]);
$this->elements_html .= "<p class='".$p_class."'>";
$this->elements_html .= ' <input name="'.$id.'" class="text_input '.$element_class.'" type="text" id="'.$id.'" value="'.$value.'"/><label for="'.$id.'">'.$element['label'].$required.'</label>';
$this->elements_html .= "</p>";
}
/**
* textarea
*
* The textarea method creates textarea elements, and prefills them with $_POST values if available.
* The method also checks against various input validation cases
* @param string $id holds the key of the element
* @param array $element data array of the element that should be created
*/
function textarea($id, $element)
{
$p_class = $required = $element_class = $value = "";
if(!empty($element['check']))
{
$element_class = $element['check'];
$p_class = $this->check_element($id, $element);
}
if(!empty($_POST[$id])) $value = urldecode($_POST[$id]);
$this->elements_html .= "<p class='".$p_class."'>";
$this->elements_html .= ' <textarea name="'.$id.'" class="text_area '.$element_class.'" cols="40" rows="7" id="'.$id.'" >'.$value.'</textarea>';
$this->elements_html .= "</p>";
}
and replace it by :
/**
* text
*
* The text method creates input elements with type text, and prefills them with $_POST values if available.
* The method also checks against various input validation cases
* @param string $id holds the key of the element
* @param array $element data array of the element that should be created
*/
function text($id, $element)
{
$p_class = $required = $element_class = $value = "";
if(!empty($element['check']))
{
$required = "*";
$element_class = $element['check'];
$p_class = $this->check_element($id, $element);
}
if(!empty($_POST[$id])) $value = urldecode($_POST[$id]);
$value = $element['value'];
$this->elements_html .= "<p class='".$p_class."'>";
$this->elements_html .= ' <input name="'.$id.'" class="text_input '.$element_class.'" type="text" id="'.$id.'" value="'.$value.'"/>';
$this->elements_html .= "</p>";
}
/**
* textarea
*
* The textarea method creates textarea elements, and prefills them with $_POST values if available.
* The method also checks against various input validation cases
* @param string $id holds the key of the element
* @param array $element data array of the element that should be created
*/
function textarea($id, $element)
{
$p_class = $required = $element_class = $value = "";
$value = $element['value'];
if(!empty($element['check']))
{
$element_class = $element['check'];
$p_class = $this->check_element($id, $element);
}
if(!empty($_POST[$id])) $value = urldecode($_POST[$id]);
$this->elements_html .= "<p class='".$p_class."'>";
$this->elements_html .= ' <textarea name="'.$id.'" class="text_area '.$element_class.'" cols="40" rows="7" id="'.$id.'" >'.$value.'</textarea>';
$this->elements_html .= "</p>";
}
And in your contact-form.php, found in your includes folder, change this:
$elements = array(
'yourname' => array('type'=>'text', 'label'=>__('Name','avia_framework'), 'check'=>'is_empty'), //user name
'email' => array('type'=>'text', 'label'=>__('E-Mail','avia_framework'), 'check'=>'is_email'), //user email
'website' => array('type'=>'text', 'label'=>__('Website','avia_framework'), 'check'=>''), //user website
'subject' => array('type'=>'text', 'label'=>__('Subject','avia_framework'), 'check'=>'is_empty'), //subject
'message' => array('type'=>'textarea','label'=>__('Message','avia_framework'), 'check'=>'is_empty'), //message
'myemail' => array('type'=>'hidden', 'label'=>'', 'check'=>'', 'value'=> avia_get_option('avia, email') ), //email adress the form should be sent to
'myblogname'=> array('type'=>'hidden', 'label'=>'', 'check'=>'', 'value'=> get_option('blogname') ), //name of the website, gets added to the subject line
'username' => array('type'=>'decoy', 'label'=>'', 'check'=>'must_empty'), //decoy input field for bots, input field gets hidden, if bot enters value form wont be submitted
);
to this:
$elements = array(
'yourname' => array('type'=>'text', 'value'=>'Name*', 'label'=>__('Name','avia_framework'), 'check'=>'is_empty'), //user name
'email' => array('type'=>'text', 'value'=>'E-Mail*', 'label'=>__('E-Mail','avia_framework'), 'check'=>'is_email'), //user email
'website' => array('type'=>'text', 'value'=>'Website', 'label'=>__('Website','avia_framework'), 'check'=>''), //user website
'subject' => array('type'=>'text', 'value'=>'Subject*', 'label'=>__('Subject','avia_framework'), 'check'=>'is_empty'), //subject
'message' => array('type'=>'textarea','value'=>'Your Message ..', 'label'=>__('Message','avia_framework'), 'check'=>'is_empty'), //message
'myemail' => array('type'=>'hidden', 'label'=>'', 'check'=>'', 'value'=> avia_get_option('avia, email') ), //email adress the form should be sent to
'myblogname'=> array('type'=>'hidden', 'label'=>'', 'check'=>'', 'value'=> get_option('blogname') ), //name of the website, gets added to the subject line
'username' => array('type'=>'decoy', 'label'=>'', 'check'=>'must_empty'), //decoy input field for bots, input field gets hidden, if bot enters value form wont be submitted
);
Excuse me for the delay. I hope this works for you. - Does for me.