Reputation:
Is there any way to make each one of the buttons that makes up an array, opens a form using jQuery Dialog and that when the form is filled out, its content is stored in a hidden field in the same row of the button that opened the modal form?
I have post an example at jsFiddle.net : http://jsfiddle.net/UQFxP/14/
In that example you can see a colum (Add Reason) of buttons. Well, I need that all of those buttons open a dialog as the big "Add" button bellow the table does, but I have no idea how to do it :(
Hope you can help with this
Upvotes: 1
Views: 1933
Reputation: 2713
Not really sure if it's what you need, but check http://jsfiddle.net/UQFxP/25/
Upvotes: 2
Reputation:
Try this: add a name to all of the buttons, say "add" and then in jquery add this:
$("button[name=add]").click( function() {
$( "#formReason" ).dialog( "open" );
});
Upvotes: 1