I have a form with a submit button and a handler that stores data in the database. Problem is when the form is submitted, all data is cleared from the input fields. Is there a way to still show them after submit? What changes do I need to make to my…
I'm trying to submit a form and use hook_form_submit.
The problem is the form is displayed via ajax and this results in hook_form_submit not being called.
$items['ajaxgetform/%'] = array(
'page callback' => 'ajaxgetform',
'access arguments'…
I know that is used in a drupal module to specify that only anonymous users can see that module. What would be the callback that specifies only logged in users ?
I have a page that I only want accessible to logged in users.
Thank You
My form, lets call it organize_issue, is a form in a custom module being called from the menu using the page callback drupal_get_form function. The form works perfectly well.
I'm trying to implement some AHAH type functionality now, and need to get…
I created my own module called "cssswitch". I'm trying to create my own html layout to display the admin form portion of the module. I understand how to use the hook_form_alter() to modify form elements, but I need to create the entire form layout…
Is there an easy-ish way to modify the webform-form-tpl.php template to show disclaimer text above the submit button in a Drupal webform? I can add text below the button, but do not know how to split up the button from the other elements to add text…
I have two submit buttons on my form. One is the normal submit button that calls `my_form_submit` like-ah-so:
$form['fieldset']['submit'] = array(
'#type' => 'submit',
'#value' => 'Show Applications',
);
I want to add another button that will…
I know how to use a module to create a block and I know how to create a custom form using form api.
now, i want to add this custom form inside the block I create.
Is it possible to add additional form elements in the validate or submit functions in drupal 7 module? The following code works and image is displayed on the form:
function test1_form($form, &$form_state)
{
$form['image']=array(
…
I need a form which will allow creation of several related nodes at the same time. All of the nodes involve CCK fields.
I would like to use as much of CCK's built-in validation, submission, input widget, and security functionality as…
I need to add a programmatic form to a node in Drupal 7. How to attach the form to the node?
function addtabexample_form($node, &$form_state) {
$type = node_type_get_type($node);
$form['title'] = array(
'#type' => 'textfield',
'#title'…
i have form in drupal which uploads images and has got few checkboxes in it.
Here is the form:
$form['checklist_fieldset'] = array(
'#type' => 'fieldset',
'#title' => t('Check List'),
'#collapsible' => FALSE,
'#collapsed' => FALSE, …
I have a hook_form() and I'm trying to submit the data to the database.
When the form options generates, it generates like
I'm not trying to get the 'value' of the option.
I'm trying to grab the part in-between the…
We are importing our sales orders from our accounting system into a Drupal 6 site.
We setup a content type called orders.
I would like to build a shipping module for our shipping provider (no there isnt already one).
I understand how to build…