By marcus.follrud on
Hello.
I have a problem with a function of mine.
I have a form that contains two textareas.
One named amount and one named email. when submitting the form it runs the _validate() function and the the _submit() function if validated correctly, right?
What i want is a table containing the same form, but with hidden input types and a submit button that redirects to another webpage. I really can't figure this one out. Should i use a template containing the form and output? Or is there another function in drupal that i'm missing out?
I've tried use another form in the _submit function and return it in drupal_get_form. But then the page just returns blank.
Any advice would be highly appreciated!
Comments
Egbert - Zeezeilen -
Egbert - Zeezeilen - www.zzln.nl
Hi Marcus,
I do not really understand why you need hidden fields and a button that simply redirects you to the other page. So maybe this is not the feature you are looking for, but the standard is ending the fom_submit function with
return 'node/3';
}
That is, whatever page in your site you want to redirect the user to after the form data have been handled by the submit function.
Egbert
Egbert - webdevelopment and implementation - www.overboord.nl
Hello Egbert, Think of it as
Hello Egbert,
Think of it as a receipt or a "please confirm" page. The submit on that page will later go to another website (www.payson.se) with the post material.
All that the user needs to see is the email and amount. The hidden fields is for redirect url from payson site among others, which users don't have to see.
I'm creating a module that can donate via Payson (similar to paypal). It has a special system for handling requests and payment which i think is really good.
I tried use some theming functionality but it wouldnt load into the page, don't know why.
Can i use
return 'http://whateversite/postmaterial.php'; //?
And send the post information from there?