Load form with disabled fields by clicking button

Asked

Viewed 101 times

0

I would like to make a function in js, that when clicking on a display button, when directing to the page, load my form with all my fields disabled, so that the user can not change anything. How can I do?

  • Which part you need help with? $('#idDaForm :input').attr('readonly','readonly'); should be enough to put everything readonly. Is this what you’re looking for? -> http://jsfiddle.net/nuxxf9Lr/

  • My button visualize this on an index page: td(style='text-align: center') a(class="btn btn-search", id="staff" href="staffs/#{staff._id}") i.Halflings-iicon.white.search When clicked, directs to the above address, but I need that when directing to this page, the form is disabled.

  • 1

    I think you need to [Edit] and clarify the question a little bit more. The form is on a different page than the button? how do you want to fetch this HTML? Also explain a little better the functionality you want to understand better what you’re looking for.

  • you need to "instantiate" your form in a new form, and this second form needs to be with all the fields disabled correctly? this second form needs to be instantiated in pop-up or in a new browser tab?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.