Change text of Submit button in Concrete5.6.1.2
Permalink 1 user found helpful
I have been making myself nuts working on this today. No matter what I do, I can not get the text of the Submit button to change on a form. I have made a seperate template and copied the form_minisurvey.php into the template folder but it still pulls the text from the default. I am doing a multilingual page and so it won't work to change the core. Can anyone help me with this?
Thanks for the reply John! I did exactly what you suggested and still get "Submit" instead of the text I want. I don't understand why it is not overriding the core. Do you have an idea?
Changing form block labels always is pain in the neck, if you do not want to change anything at the core, simplest way would be using jquery. create a template, select every element you want and change its label/values.
Thanks for the reply. I don't know my way around jquery that well. Is there help on the net to figure that out or how would I search it?
Use the "Form Tableless Layout" custom template (http://www.concrete5.org/marketplace/addons/form-tableless-layout/... ), which has plain old markup for the submit button. Just change this line at the bottom of the template to whatever you want:
-Jordan
<input type="submit" name="Submit" class="submit" value="<?php echo $translatedSubmitLabel; ?>" />
-Jordan
Although I didn't really want to spend the time to style the form, asfter struggling so long having to style it seemed like a breeze. Thanks for encouraging me to use your great addon Jordan! And thanks to everyone who tried to help!
I really think this text needs to be easier to edit. It seems like a common requirement for us all to want to change the text to something more useful than the default. It should be editable via the form editor in my opinion... 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 :)
If you think good idea, can you show your support in this thread? Thanks :)
System & Settings > Cache & Speed Settings > Disable "Overrides Cache"
If it was on, clear the cache.
Then copy concrete/blocks/form/controller.php to blocks/form/controller.php
Copy the entire loadSurvey() function from concrete/core/controllers/blocks/form_minisurvey.php (lines 140-215)
Edit blocks/form/controller.php so it looks like this:
Notice how the entire function is inside the MiniSurvey class.
Change the t('Submit') inside there and you should be good to go.
John