Kevlys
Kevlys

Reputation: 136

nyromodal : When submitting a form, the name attribute of submit button and its value are not transmitted to server

I'm using Nyromodal and I need to have 2 submit buttons ("save", "save and add") in my form and depending on which button I click, my server should redirect me on the right page using the name attribute of the <input type="submit" />

My problem is when I submit my form, the name attribute of submit's button and its value are not present in the $_POST variable.

All works perfectly if I don't display my form with nyroModal.

with nyroModal :

array (size=1)
  'form' => 
    array (size=2)
      'title' => string 'azerty' (length=5)
      'date' => string '12/07/2012' (length=10)

without nyroModal :

array (size=2)
  'form' => 
    array (size=2)
      'title' => string 'azerty' (length=30)
      'date' => string '12/07/2012' (length=10)
  'submit_button_name' => string 'OK' (length=7)

anyone have an idea how to do this with nyroModal

Thanks

Upvotes: 0

Views: 452

Answers (1)

Kevlys
Kevlys

Reputation: 136

The solution is to place an <input type="hidden" name="" /> in the form and assign a value to the name attribute when click on submit button.

Upvotes: 0

Related Questions