Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Richard Eyres 98 posts 580 karma points
    Mar 14, 2013 @ 12:22
    Richard Eyres
    0

    Change submit button text on a per form basis

    Hopefully this will be something quick and easy, but i have been unable to locate an answer.

    This is in relation to Contour 3.0.9

    I would like to change the text for the submit button on a per form basis. I have a site that will have 3 forms, and the text for the buttons should be different. Is there a facility for this? Or will i have to go down the jQuery route?

  • Simon Hewitt 65 posts 126 karma points
    Mar 15, 2013 @ 12:20
    Simon Hewitt
    0

    According to the documentation you can add macro parameters to change the button text so you would have to create a new macro and add a 'SubmitButtonText' property (string type) and point it at the same razor script as the pre installed Contour macro.

    More information can be found in the Enabling advanced Macro properties section on page 18 of the pdf documentation. I will post a link when I can remember where I got it from!

    edit:

    I found the link, you can download the pdf from the bottom of the list of archived files on the project page http://our.umbraco.org/projects/umbraco-pro/contour.

    I haven't tested this to see if it works so would appreciate it if you would post back with your results.

  • Matthias Bier 30 posts 90 karma points
    Mar 15, 2013 @ 15:52
    Matthias Bier
    0

    Since I'm having the same problem, I want to share my experience. I'm using the razor macro.

    I tried to use Advanced Macro Parameters to set the caption of the submit button. But the caption remains "Submit"...

    I found this issue in the issue tracker: http://issues.umbraco.org/issue/CON-268 ;

    It speaks about adding an easy way to change the caption - But it does not say what the hard way is...

     

  • Simon Hewitt 65 posts 126 karma points
    Mar 15, 2013 @ 16:12
    Simon Hewitt
    0

    I suppose the hard way is creating a template per form and just hardcoding the button text there.

    See current docs for how to create template per form http://our.umbraco.org/projects/umbraco-pro/contour/documentation/developer/Custom-Markup/

  • Matthias Bier 30 posts 90 karma points
    Mar 15, 2013 @ 16:32
    Matthias Bier
    0

    Well, I have a multi language site and need the submit button text to be multi language (dictionary item). Any idea how this could work?

    Thank you

    Matthias 

  • Simon Hewitt 65 posts 126 karma points
    Mar 15, 2013 @ 16:40
    Simon Hewitt
    0

    Yes,

    You will still have access to the library method so you can use

    @umbraco.library.GetDictionaryItem("DictionaryItemName")

    I've just tested on my own Multilingual site and it works.

Please Sign in or register to post replies

Write your reply to:

Draft