Questions tagged [forms]

Use it for questions about the Form API. Don't use it for entity or entity field forms.

Filter by
Sorted by
Tagged with
5
votes
3answers
147 views

Is there a module for site explanation messages?

Many sites have text areas which appear to explain things to new users. With an option to hide the message in future. I haven't seen such a module for Drupal, does one exist? I have tried googling ...
4
votes
2answers
4k views

How can I add an extra button & submit handler to an exposed view form?

I would like to add a second button to an exposed view form. I am able to get the button to display, but not to have it call the button submit handler. Instead, it behaves just like the standard ...
1
vote
2answers
777 views

Save and preview differences in hook_form_alter()

I've created a module which uses hook_form_alter(). When a form is loaded (node/add) I hide a field, and the hook works fine. The problem appears when I do a preview of the form. When the form appears ...
1
vote
2answers
399 views

Can I expose the signup form through views 2?

I am using Signup and Views in Drupal 6 (I can't install Drupal 7), and I created a view that lists all the nodes for which users can signup. Now I want to enable users to signup for one of these ...
6
votes
2answers
2k views

How should I handle container form elements?

I have added some custom fields to the register user form and I'm discovered that they are sent back, packaged in a form element of type "container". My code needs to handle all kind of different ...
4
votes
2answers
2k views

Send a CSV file to the user on FAPI form submit

I have a FAPI form that collects some information from the user, then generates a CSV file. The intent is when the user clicks 'export' on the form, the CSV is downloaded straight away. However, when ...
3
votes
1answer
1k views

Node form redirect based on submit button value

I've read and experimented with several ways to redirect a form once submitted. However, I only want to redirect a node form if the operation is t('Save'). If I set $form['#redirect'] = 'blah' in ...