Copied to clipboard

Flag this post as spam?

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


  • Brad 94 posts 151 karma points
    Apr 09, 2013 @ 03:49
    Brad
    0

    Unique input names. Are they persistant?

    On a form I have just built in Contour I need to add some jquery and an ajax call to perform an autocomplete on a textbox.

    The form has a Dropdown box which has the states in Australia.

    And it has a text box to enter a busness name. The business names are to be read from a database with a query based on the state the user has selected.

    Looking at the form that is output by Contour, I can see that the form elements have a rather 'guid' looking ID value. For example, my Business Name textbox above is rendered like this..

    <input id="1da50409-8282-42a8-9096-779046c42fdb" class="text" type="text" etc etc 

    Now this might seem like a simple question, but I need to be sure. Will this ID value be 100% persistant. Will this ID value ever ever change? Can I be sure that Umbraco will not render this field with another ID somewhere down the track, regardless of how many other form elements I add or remove?

    If I know that my jquery can reference this textbox like this..

    $('#1da50409-8282-42a8-9096-779046c42fdb')


    . . . then there is no problem. I just need to confirm this.

     


     

     


     

     

     

  • Comment author was deleted

    Apr 09, 2013 @ 11:07

    Hi Brad,

    The only way the id will change is if you remove the field from the form and then add one back with the same caption...

Please Sign in or register to post replies

Write your reply to:

Draft