I want a form to submit, update a DB record, then re-render itself with the new info in the form. I am using
function formname() {...}
to render the form, and
function formname_submit() {...}
to process the form. However I find I am unable to modify the form (e.g. add a hidden form field) in the
formname_submit() function. The problem: After the submit button is clicked, Drupal 4.7 seems to first execute the function formname(), THEN execute function formname_submit(). So you do not process the form until after you have re-rendered it.
I have the PayPal Subscriptions module almost working but have one pretty niggly issue:
- The IPN return page that PayPal redirects to - http://%mysite%/paypal/ipn is blank/empty.
I'd expect this page to have something on it thanking the customer for their payment but nothing appears.
The rest of the module is working beautifully (thanks) : I do get notified of the payment and it does have a status of 'completed'. So the correct code is actually executed.
I'm in the process of writing a "film production" database module for drupal. It will have tables (nodes) like "Projects", "Cast and Crew" etc. Obviously, I'd like to connect the "Projects" table to the "Cast and Crew" table with a many-to-many relationship. But my question is this: how can I "spell check" names to see if they already fit in the database.
I would like to use AJAX (to submit form data and get response) for a simple module I am developing. From the disscussion that has been going on in the forums I have learnt about the functions (HTTPPost, HTTPGet etc) available in misc/drupal.js. But I have no idea as how to implement these functions. Can anybody point me to a 'HOW TO' or else provide me some examples on how to use this functions.
Perhaps a handbook page in the module developers guide could be dedicated for this purpose as I believe many are eager to try AJAX with Drupal.
I am using Alex Reisner's excellent formproc module, but cannot get the "formproc_charcount" feature to work. A working example of it can be found at his page at: http://www.alexreisner.com/drupal/modules/formproc