Thanks for this - I'm comfortable with everything you suggest... It's just the really fundamental thing of how to detect whether the form has been submitted when I don't know and can't specify the name for fields and/or the submit button.
Normally I'd do this:
if ( isset ( $_POST ['submit'] ) ) {
//do stuff
}
But I can't do that without knowing the name of the Submit button... So all the rest of what you suggest makes perfect sense, I just can't get past the first and most basic step.
EDIT:
So I did a bit more playing around. Am I right that GF automatically adds a hidden field called gform_submit?
I've used this to test whether the form has submitted:
if ( isset ( $_POST ['gform_submit'] ) ) {
//do stuff
}
Grateful if you could let me know if you see any problems with that.
Posted 12 years ago on Tuesday March 6, 2012 |
Permalink