i've been working with Contour for a day or two and i only found one problem with this otherwise great product. I can't find a way to change the text on the submit button, is it at all possible at this time or am i just to blind to find it.
I was in the same boat as you. What I've done (for the time being) is use a javascript to change the text when the form loads. To get the id of the button, just view the page source. I'm not sure if the id changes. Hope this helps.
var button = document.getElementById("ctl00_ctl00_ctl00_ContentPlaceHolderDefault_MainContent_RenderForm_13_b_next")
button.value = "whatever you want the button text to be"
The submit button uses the dictionary item #Submit, so you could add that item and set it's value to something else.
For the javascript fix, the ID is based on the control the macro is placed inside of, so if you move the macro or add it to another master template, it might change. Instead you could use jQuery and find the button based on it's css class instead.
I could not get the dictionary item method to work. I tried creating nodes named both '#Submit' and 'Submit'. I have not used dictionary nodes previously. Is there anything obvious that I'm missing?
What do you mean by assigning the language? I'm not getting this to work either on a website with the language defined through "manage hostnames" and dictionary items added for both #Submit and Submit in that language...
I really wish there could be a property in Contour that lets you specify the text on PER form and also lets you use an imagebutton instead of a regular input button.
I know this post is old, but the problem is still there.
However I looked in the developer documentation, that showed me how to enable change of text on submit buttons
What I have done is this:
go to the developer section in Umbraco, expand the "macros" folder, and select the "insert macro from umbraco contour".
On the macro edit screen, click "Browse properties" you will then be presented with this screen which add
the selected the properties when you click "save properties.
Afterwards I have gone to my page where the form should be inserted. Chossen the form in my macrocontainer, and I see the new fields. I change the name on the submit, and click save/publish.
Here the problem starts. My text is not used on the form. What to do?
We never had any issues with this, if you have languages defined for your different nodestructures, you can simply use a dictionary item for the submit button and it'll automatically be used ?
so you can change the text out of the box, and even get multi-lingual support unless you created a 1:1 multilingual site (which is very 1999 :p )
Update: nevermind, I didn't read that you wanted a different text for different forms...
Old topic, but I run into the same problem as Johan Roug I am able to get the parameters to show in the macro by clicking the "Browse properties" button after installing contour. Except after re-adding the contour macro to my template and after setting the "SubmitButtonText" I doesn't show in the frontend. (I also published the entire website)
I'm using Umbraco 4.7 and Contour 1.1.8
However, creating a dictionary item called "submit" (lowercased) does seem to work. Except this is not really as expected, the macro parameter should be working as wel I think.
Hi, some what adjacent to this, is there a way to set the text of the upload file button? For the moment this text is in Dutch and I would like to have it in English:
Just a small correction to a post above. For Wizards the previous button uses the dictionary item "prev" not "previous".
Regarding the text of the upload file button, do you mean the button used to select a file? If so, I think the short answer is going to be "no" as this is generated by the browser from <input type="file" />. The control will look different in different browsers and will use the language of the browser.
I would just add to this that it is a good idea to add the "next", "prev" and "submit" dictionary items even if you don't want to change the button text - and even if you're not using all three.
We had a simple form with one submit button and, with umbDebugShowTrace=on, we noticed that Contour was looking for all three dictionary items and an exception was being thrown each time. The first exception took about 4 seconds to process.
Hopefully a future version won't use programming by exception, but until now it's probably a good idea to add the items to stop exceptions being thrown behind the scenes.
Nope razor macro don't have the params but you can use dictionary items, but will add those params or look into an easier way maybe just add it on the form settings
May I suggest that you make it possible to define a standard text in the settings (umbracoContour.config) and then make it possible to change the name of the submit button in the form creator?
In ~\Umbraco\Plugins\umbracoContour\Views\Form.cshtml the value of the submit, next and previous buttons are set to @Model.SubmitCaption, @Model.NextCaption and @Model.PreviousCaption resp.
A quick fix, that's 100% sure of working, would be to modify these values but that wouldn't work for multi web sites since these values are the unique.
I've tried to set them in the dictionnary to no sucess. I'm using a single web site, I've tried lower case, with a # in front ... no success.
I'm using Umbraco v6 and Contour 3, if any knows how to make it work ...
Thanks
I'm not sure if this is the place for feature requests, but here it is :
I write pretty long sentences for the questions I use in my surveys. I sometime even need to add some html tags to highlight some words. The caption field is therefore long and complex. As this caption is used in the conditionnal option of the additional settings and in the control rendered name, would it be possible to have a caption which would correspond to an ID and a title or text that will display what's to be asked ?
Hi there, any updates on this? I'm testing umbraco 7.2 beta 2 with the newest "Umbraco Forms" (Contour) but couldn't see any way to change the "Submit" button text, besides adding a dictionary item for #Submit ... A large with many forms needs a flexibility to have different submit texts for different forms.
Submit button text
Hi
i've been working with Contour for a day or two and i only found one problem with this otherwise great product. I can't find a way to change the text on the submit button, is it at all possible at this time or am i just to blind to find it.
Regards Keld
I was in the same boat as you. What I've done (for the time being) is use a javascript to change the text when the form loads. To get the id of the button, just view the page source. I'm not sure if the id changes. Hope this helps.
var button = document.getElementById("ctl00_ctl00_ctl00_ContentPlaceHolderDefault_MainContent_RenderForm_13_b_next")
button.value = "whatever you want the button text to be"
The submit button uses the dictionary item #Submit, so you could add that item and set it's value to something else.
For the javascript fix, the ID is based on the control the macro is placed inside of, so if you move the macro or add it to another master template, it might change. Instead you could use jQuery and find the button based on it's css class instead.
I could not get the dictionary item method to work. I tried creating nodes named both '#Submit' and 'Submit'. I have not used dictionary nodes previously. Is there anything obvious that I'm missing?
Comment author was deleted
Hi Jason,
Did you also assign the language ?
Tim,
What do you mean by assigning the language? I'm not getting this to work either on a website with the language defined through "manage hostnames" and dictionary items added for both #Submit and Submit in that language...
Thanks!
Ok, nevermind, i got it from one of your older posts.
"Submit button, will fetch it's value from the dictionary item submit (if it exists)
Next button, from next
Previous button from previous"
Correct, it has to be lowercased.
I really wish there could be a property in Contour that lets you specify the text on PER form and also lets you use an imagebutton instead of a regular input button.
@Tim: anything in the works for that?
Remember that you still have to handle languages, perhas it could be exposed all in the macro.
I used thsi jquery to change the submit button text.
Very simple, and no fancy stuff like language handling or anything like that.
It's easy to make this multlingual, just set the title from within your XSLT and use dictionary items like so:
$(document).ready(function() {
$(".contourSubmit").val("[#submitComment]");
});
I know this post is old, but the problem is still there.
However I looked in the developer documentation, that showed me how to enable change of text on submit buttons
What I have done is this:
go to the developer section in Umbraco, expand the "macros" folder, and select the "insert macro from umbraco contour".
On the macro edit screen, click "Browse properties" you will then be presented with this screen which add
the selected the properties when you click "save properties.
Afterwards I have gone to my page where the form should be inserted. Chossen the form in my macrocontainer, and I see the new fields. I change the name on the submit, and click save/publish.
Here the problem starts. My text is not used on the form. What to do?
We never had any issues with this, if you have languages defined for your different nodestructures, you can simply use a dictionary item for the submit button and it'll automatically be used ?
so you can change the text out of the box, and even get multi-lingual support unless you created a 1:1 multilingual site (which is very 1999 :p )
Update: nevermind, I didn't read that you wanted a different text for different forms...
Yeah. I use the dictionary item right now as a temp solution. But as you say I need different text on different submit buttons
Comment author was deleted
Hi,
Since Contour 1.1 you can also enable some more properties on the contour macro, so you should be able to set the submit button text there
Comment author was deleted
(check the dev docs for more info http://our.umbraco.org/projects/umbraco-pro/contour )
Available Macro properties
Thanks for the answers. I am aware of these extra properties. But they don't seem to work on my solution
Comment author was deleted
Don't work, as you set them and they don't reflect or don't work as in not available on macro?
They show on macro.
Comment author was deleted
ANd if you click the browse properties button, do you get all the properties (including the button text ones)?
Cool, this works - after adding the properties to the macro with Browse properties (the 1.1 installer does not include them by default).
Old topic, but I run into the same problem as Johan Roug I am able to get the parameters to show in the macro by clicking the "Browse properties" button after installing contour. Except after re-adding the contour macro to my template and after setting the "SubmitButtonText" I doesn't show in the frontend. (I also published the entire website)
I'm using Umbraco 4.7 and Contour 1.1.8
However, creating a dictionary item called "submit" (lowercased) does seem to work. Except this is not really as expected, the macro parameter should be working as wel I think.
Hi, some what adjacent to this, is there a way to set the text of the upload file button? For the moment this text is in Dutch and I would like to have it in English:
Thanks for your help
Anthony Candaele
Belgium
Just a small correction to a post above. For Wizards the previous button uses the dictionary item "prev" not "previous".
Regarding the text of the upload file button, do you mean the button used to select a file? If so, I think the short answer is going to be "no" as this is generated by the browser from <input type="file" />. The control will look different in different browsers and will use the language of the browser.
I would just add to this that it is a good idea to add the "next", "prev" and "submit" dictionary items even if you don't want to change the button text - and even if you're not using all three.
We had a simple form with one submit button and, with umbDebugShowTrace=on, we noticed that Contour was looking for all three dictionary items and an exception was being thrown each time. The first exception took about 4 seconds to process.
Hopefully a future version won't use programming by exception, but until now it's probably a good idea to add the items to stop exceptions being thrown behind the scenes.
Is it still possible to overwrite the submit button text using the macro parameters that Rick showed earlier in this post?
I'm using version 3.0.17 and rendering the form using the Razor macro. When I setup the parameter it does not seem to have any effect.
Cheers,
Jan
Comment author was deleted
Nope razor macro don't have the params but you can use dictionary items, but will add those params or look into an easier way maybe just add it on the form settings
Hi Tim
Ah ok, I'll add the dictionary item for now then.
May I suggest that you make it possible to define a standard text in the settings (umbracoContour.config) and then make it possible to change the name of the submit button in the form creator?
Thanks for the input.
/Jan
+1 for Skovgaards suggestion.
... i've got a scenario where the current culture differs from the forms.
... meaning i cant get a custom text in the button : (
Hi,
In ~\Umbraco\Plugins\umbracoContour\Views\Form.cshtml the value of the submit, next and previous buttons are set to @Model.SubmitCaption, @Model.NextCaption and @Model.PreviousCaption resp.
A quick fix, that's 100% sure of working, would be to modify these values but that wouldn't work for multi web sites since these values are the unique.
I've tried to set them in the dictionnary to no sucess. I'm using a single web site, I've tried lower case, with a # in front ... no success.
I'm using Umbraco v6 and Contour 3, if any knows how to make it work ... Thanks
Comment author was deleted
Maintenance release coming out this month where the button captions will be on the settings tab of the form
Hallelujah!
Hi Tim
Good news, thanks
I'm not sure if this is the place for feature requests, but here it is :
I write pretty long sentences for the questions I use in my surveys. I sometime even need to add some html tags to highlight some words. The caption field is therefore long and complex. As this caption is used in the conditionnal option of the additional settings and in the control rendered name, would it be possible to have a caption which would correspond to an ID and a title or text that will display what's to be asked ?
thanks
still dont see this -> button captions will be on the settings tab of the form ??
If you want to change the text for the Submit button you need to do this in the dictionary item. Create a new dictionary item submit.
Yes i know, I just see Tim say something else....: November 11, 2013 @ 11:33
Maybe he forgot :-)
Maintenance release coming out this month where the button captions will be on the settings tab of the form
Hallelujah!
Tim, I still don't see this?? This would be a really usefull feature. Our clients don't want the same text for each form.
Ja Tim, we want it now :D
Hi there, any updates on this? I'm testing umbraco 7.2 beta 2 with the newest "Umbraco Forms" (Contour) but couldn't see any way to change the "Submit" button text, besides adding a dictionary item for #Submit ... A large with many forms needs a flexibility to have different submit texts for different forms.
Example:
Contact Form: Send
Special area: Save
Form with multiple steps: Go to step 2
etc.
Comment author was deleted
In the upcoming v4 version you'l be able to set the captions as settings on the form
@Tim Awesome.
is working on a reply...