Changing the Button Text on default form block

Permalink
Can anyone tell me how I can change the default "submit" text on the Form block
Thanks, Matt

Matteld80
 
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
It is defined in a function called
function loadSurvey( $qsID, $showEdit=false, $bID=0, $hideQIDs=array(), $showPending=0 )

Go to ROOT\concrete\core\controllers\blocks\form_minisurvey.php and find the above function and copy it to ROOT\blocks\form\controller.php under class MiniSurvey extends Concrete5_Controller_Block_FormMinisurvey {}

Then customize it as required. Its simple inherit.

Rony
Matteld80 replied on at Permalink Reply
Matteld80
Hi Rony

Like this? - I get a syntax error when adding this in

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 )


Also where am I meant to be able to customise when it's working?
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
It should be like
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 ) {
             //Code will be in the core file. Find the word 'Submit'
    }
}
Matteld80 replied on at Permalink Reply
Matteld80
This breaks the form block edit and preview tabs - doesn't show anything on those 2 tabs.

I've also searched for Submit in all the files in the block folder and cant find the word Submit in any of them
malkau replied on at Permalink Reply
malkau
htarlov explains the current options available to change this text here:
http://www.concrete5.org/community/forums/usage/change-content-of-s...

Basically, options are:
1. add another language translation (somehow)
2. change it clientside with JavaScript
3. override the form block controller and edit the label directly in the PHP

Another (what I normally do) is create a custom template and hard code it there also.

In my opinion these are all overly complicated for something that should be simple... it should just be another option (a simple text field) in the form block editor.

** So I've posted a feature suggestion.https://www.concrete5.org/community/forums/5-7-discussion/feature-re...
If you think good idea, can you show your support in this thread? Thanks :)