Copied to clipboard

Flag this post as spam?

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


  • Martin 114 posts 313 karma points
    Feb 18, 2015 @ 10:56
    Martin
    0

    Umbraco Forms and custom CSS & Dropdown issue

    Hi,

    Are there any docmuent or cheatsheet explaing how a custom CSS should be written?  Or is it basically that you name a stylesheet and then style the decendants of the main "form wrapper" depending on what type the fields are?

    And also, it is possible to create a dropdown list where the selector names and actual values differs, as for example like this:

       <select name="places">
        <option value="-1">Select</option>
          <option value="1">One</option>
          <option value="2">Two</option>
          <option value="3">Three</option>
        </select>

    Regards,

    Martin

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 18, 2015 @ 11:21
    Dennis Aaen
    0

    Hi Martin,

    I donĀ“t think there are any docmuent or cheatsheet explaing how a custom CSS should be written. But I would just create a new stylesheet and the just target the elements that you want to change CSS, and override the default form CSS styling.

    The documentation about Umbraco Forms, can you find here https://our.umbraco.org/documentation/Products/UmbracoForms/Developer/, and about custom markup https://our.umbraco.org/documentation/Products/UmbracoForms/Developer/Custom-Markup/

    I am not sure that I am 100% sure what do you mean about the question with the dropdown. You can add values to the dropdown, so the values that the user will see is one, two three.

    Hope this helps,

    /Dennis

  • Martin 114 posts 313 karma points
    Feb 18, 2015 @ 11:33
    Martin
    0

    Ok, thanks Dennis, I will do so with the CSS.

    Regarding the dropdown, what the user see (using the example above) would be "One", "Two"  and "Three". But when the form is submitted, it will submit the one of the values 1, 2 or 3. So that is my concern, Umbraco Forms does not seem to offer this option yet. But perhaps in the future?

    /

    Martin

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 18, 2015 @ 11:49
    Dennis Aaen
    0

    Hi Martin,

    So you mean the when you get the email, then you get the 1,2,3 instead of the "One", "Two"  and "Three". I assume there that you are using the the standard email workflow.

    To get full control over the email markup you need to use the send xslt transformed email, then you have full control over your markup.

    https://our.umbraco.org/documentation/Products/UmbracoForms/Editor/Attaching-Workflows/#Sendxslttransformedemail

    And try to see my comments in this thread. https://our.umbraco.org/forum/umbraco-pro/contour/61293-UmbracoForms-Email-Templates,-where-are-they

    Hope this helps,

    /Dennis

  • Martin 114 posts 313 karma points
    Feb 18, 2015 @ 12:26
    Martin
    0

    Hi Dennis,

    What I mean is that using a <select> dropdown by html standard offers the option to have values (which is the actual value submitted but not visible to the user) and corresponding option text which is presented to the user (analogously to a html link, you have the option to display a different namn other than the filename itself).

    But are you saying that the dropdown generated from Umbraco Forms are not of the typ `<select>` ?    And I am not asking because of emails, I just want to store other values in the form database, from what the user is seeing. My current website (which I am currently moving to an Umbraco platform), I have several dropdowns where to the user for example chooses between City names but in the database corresponding id-numbers are stored instead (i.e. the values from the dropdown and not the option labels). For example [http://www.dynamicguru.com/html-drop-down-generator/][1] makes it perhaps more clear what is the difference between "value" and "option text". But I guess that Umbraco forms today does not offer this possibility but instead "value" and "option text" must be the same.

    I hope you understand what I mean.

    Regards, Martin


      [1]: http://www.dynamicguru.com/html-drop-down-generator/

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 18, 2015 @ 12:38
    Dennis Aaen
    0

    Hi Martin,

    If you are uing the DropDownList field in Umbraco forms, then it will have the value that you add when you set it up.

    So if you added One as the value, then the value attribute on the option in the select then it looks like this:

    <select name="1d70e212-323c-448f-dbca-9edb1f0ec5b9" id="1d70e212-323c-448f-dbca-9edb1f0ec5b9">
        <option value=""></option>
            <option value="One">One</option>
    </select>

    So as I see it, it does what you are asking for out of the box

    Hope this helps,

    /Dennis

  • Martin 114 posts 313 karma points
    Feb 18, 2015 @ 12:47
    Martin
    1

    But that is not what I want, as I have exemplified above. I want to have be able to set different values than the option text. So in your example, I would like to be able to change the value to "1" but still keep that option text "One":

    <selectname="1d70e212-323c-448f-dbca-9edb1f0ec5b9"id="1d70e212-323c-448f-dbca-9edb1f0ec5b9">
       
    <optionvalue=""></option>
           
    <optionvalue="1">One</option>
    </select>

    But this will perhaps be possible in future version :-)

     

    Regards /martin

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 18, 2015 @ 12:53
    Dennis Aaen
    100

    Hi Martin,

    Okay now I got it, sorry for the confusion, my bad. Then I think that you should make a feature request on the issue tracker so the HQ, knows that you think it could be nice to be able to change the value attribute to something different than the option text.

    You can create the feature request here: http://issues.umbraco.org/issues/CON

    Once again, sorry for the misunderstanding on my side.

    /Dennis

  • Martin 114 posts 313 karma points
    Feb 18, 2015 @ 19:04
    Martin
    0

    No worries,

    Thanks Dennis, I will do so.

  • Jonathan Roberts 409 posts 1063 karma points
    Dec 13, 2016 @ 09:45
    Jonathan Roberts
    0

    Does anyone know how to populate a second Umbraco Forms dropdown depending on what the user has chosen from the parent drop down?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 13, 2016 @ 09:52
    Dennis Aaen
    0

    Hi Jonathan,

    Perhaps you can use conditional logic to solve this. Try to see the documentation below.

    https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Editor/Creating-a-form/Conditional-Logic/

    Hope this helps,

    /Dennis

  • Jonathan Roberts 409 posts 1063 karma points
    Dec 13, 2016 @ 10:00
    Jonathan Roberts
    0

    That sounds like a great way - many thanks. Is there a way that you can create the drop down options dynamically from a webservice?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 13, 2016 @ 10:21
    Dennis Aaen
    0

    Hi Jonathan,

    Perhaps you can create your own custom fields type for Umbraco Forms.

    https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Fieldtype

    Best,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft