VIPStephan
10-07-2008, 03:40 PM
I’ve got a form that is enhanced with niceforms (http://emblematiq.com/projects/niceforms/) but the requirement is that it’s submitted when a checkbox or radio button is checked. I’ve modified it already so that onchange is working with selects but the modifications I found on the internet didn’t take radio buttons and checkboxes into account. An example of one of the forms in question can be found here: [link removed]
If you know niceforms you know that the form controls are replaced by regular elements that can be styled at free will. The problem is that an onchange event with the regular form controls doesn’t work anymore since these form controls aren’t actually changed by user input. So, whenever a checkbox (or radio button – there are more forms on other pages) – including the adjacent label – is clicked it should submit the form but still show the already checked controls as checked (i. e. not return to the default unchecked state – don’t know if that’s something that’s done with PHP, though). And if checkboxes are unchecked it should also submit the form with the values of the yet checked form controls. I hope you get what I mean? If not feel free to ask.
The checkboxes/radio buttons need some trigger attribute since some of those controls actually won’t be submitting anything so it would be best if one could add a specific class name that is read by the script and then executes the submission only if that class is present.
Despite my somewhat longish explanation this shouldn’t be a too hard task for an experienced JS developer so I guess €50 should be OK. I’m open to suggestions, though, if you think this will be a major issue. Payment will be done via Paypal preferably.
Please, only respond if you’re actually confident about what you’re doing (i. e. a real pro) as it’s crucial that this works flawless and without causing more headaches later on if other changes are made.
And did I mention that it’s kinda urgent? Best would be if I got that done today since we’re behind the schedule already due to these form issues.
If you know niceforms you know that the form controls are replaced by regular elements that can be styled at free will. The problem is that an onchange event with the regular form controls doesn’t work anymore since these form controls aren’t actually changed by user input. So, whenever a checkbox (or radio button – there are more forms on other pages) – including the adjacent label – is clicked it should submit the form but still show the already checked controls as checked (i. e. not return to the default unchecked state – don’t know if that’s something that’s done with PHP, though). And if checkboxes are unchecked it should also submit the form with the values of the yet checked form controls. I hope you get what I mean? If not feel free to ask.
The checkboxes/radio buttons need some trigger attribute since some of those controls actually won’t be submitting anything so it would be best if one could add a specific class name that is read by the script and then executes the submission only if that class is present.
Despite my somewhat longish explanation this shouldn’t be a too hard task for an experienced JS developer so I guess €50 should be OK. I’m open to suggestions, though, if you think this will be a major issue. Payment will be done via Paypal preferably.
Please, only respond if you’re actually confident about what you’re doing (i. e. a real pro) as it’s crucial that this works flawless and without causing more headaches later on if other changes are made.
And did I mention that it’s kinda urgent? Best would be if I got that done today since we’re behind the schedule already due to these form issues.