Removing a form element

Step 1

Remove the HTML for the form element in your web page. Each form element and its associated wrappers are commented individually in index.html. Find the form element you want to remove by looking at the text inside in the <label> tag. Once you’ve found it, delete the HTML code between the comments surrounding the element. For example, to remove the Type the word (CAPTCHA) element, search index.html for the term Type the word and delete the lines between the start and end comments surrounding the element HTML as shown below.

1
2
3
<!-- Begin Captcha element -->
... Delete everything between these comments (and the comments too) ...
<!-- End Captcha element -->
<!-- Begin Captcha element -->
... Delete everything between these comments (and the comments too) ...
<!-- End Captcha element -->

Step 2

Remove the form element from the process.php file to make the PHP script aware that the form element is no longer there. In quform/process.php, locate the code that creates the form element you want to remove. If you wanted to delete the Type the word (CAPTCHA) element, search for the term $captcha, the code you are looking for would be:

1
2
3
4
5
6
$captcha = new Quform_Element('type_the_word', 'Type the word');
$captcha->addFilter('trim');
$captcha->addValidator('required');
$captcha->addValidator('identical', array('token' => 'catch'));
$captcha->setIsHidden(true);
$form->addElement($captcha);
$captcha = new Quform_Element('type_the_word', 'Type the word');
$captcha->addFilter('trim');
$captcha->addValidator('required');
$captcha->addValidator('identical', array('token' => 'catch'));
$captcha->setIsHidden(true);
$form->addElement($captcha);

Remove (or just comment out) all of these lines.

Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy