Tagged: forms
Hi,
Is there a way to limit this number? I mean main message input window, as shown here http://kriesi.at/themes/enfold/pages/contact/
Best regards,
Wojtek
OK, I have found solution – “rows” parameter in this line:
$this->elements_html .= ‘ <textarea name=”‘.$id.'” class=”text_area ‘.$element_class.'” cols=”40″ rows=”7″ id=”‘.$id.'” >’.$value.'</textarea>’;
in class-form-generator.php file located here: ./wp-content/themes/enfold/framework/php/
But the question is how to embed this change into child theme?
Hey!
As far as I know the contact form code/class is wrapped into a “class_exists” check – thus you can overwrite it with a child theme. Just make a copy of the /wp-content/themes/enfold/framework/php/class-form-generator.php file and place it into the child theme folder. Then modify class-form-generator.php in your child theme folder and add following code to the child theme functions.php:
require_once( 'class-form-generator.php' );
to include the code/file. WordPress will load the child theme code first and the parent theme will use it because the “class_exists” check avoids that the contact form code will load a second time.
Cheers!
Peter