Add reset button to form

Permalink
How can I add a reset button to the standard form block?

trixiemay
 
emirii replied on at Permalink Best Answer Reply
emirii
Create a folder called "form" in your concrete5 install folder under the blocks folder like so:
/concrete5install/blocks/form

Then, make a blank php file named "controller.php" inside this form folder.

then copy code below into your blank controller.php file.
<?php  
defined('C5_EXECUTE') or die("Access Denied.");
class FormBlockController extends Concrete5_Controller_Block_Form {}
class FormBlockStatistics extends Concrete5_Controller_Block_FormStatistics {}
class MiniSurvey extends Concrete5_Controller_Block_FormMinisurvey {      
      function loadSurvey( $qsID, $showEdit=false, $bID=0, $hideQIDs=array(), $showPending=0 ){
         //loading questions   
         $questionsRS=$this->loadQuestions( $qsID, $bID, $showPending);
         if(!$showEdit){
            echo '<table class="formBlockSurveyTable">';               
            while( $questionRow=$questionsRS->fetchRow() ){   
               if( in_array($questionRow['qID'], $hideQIDs) ) continue;
                  $requiredSymbol=($questionRow['required'])?' <span class="required">*</span>':'';
                  echo '<tr>
                          <td valign="top" class="question"><label for="Question'.intval($questionRow['msqID']).'">'.$questionRow['question'].''.$requiredSymbol.'</label></td>


Be sure to view the entire code! Clear your cache afterwards!
trixiemay replied on at Permalink Reply
trixiemay
Fantastic thanks!

2 minute job to change and good to know for future projects.