Forms are the primary method for obtaining and acting upon user input in Drupal.

learn more… | top users | synonyms (1)

1
vote
0answers
10 views

How can I find which modules alter my form?

Is there a way to debug the list of modules which alters my form (using form_ID). I can get a list of modules implementing hook_form_alter using module_implements('form_alter') but how can I know ...
0
votes
1answer
16 views

Embed form within a form

I am building on an existing site, adding / modifying functionality to it. There is a form, which is a part of a (sort of a) multi-step form which I need to alter, and add another form to it. So, I ...
0
votes
0answers
11 views

Reuse form from another module in multistep form

I have built a multistep form, and it works fine. Now I have installed LoginToboggan module, It has the option of show a unified login/registration form. I would like to set the last step of my ...
0
votes
0answers
11 views

DRUPAL 6 Dependent Drop Down?

i need to create dependent drop down like, if i select drop down one then automatically load related list in second list through ajax call, using change event. But there is option in drupal 7 like ...
0
votes
0answers
17 views

How to upload images in form - Drupal 6 [on hold]

I want to create a form with 2 fields for uploading 2 images. I have read some examples on internet and doing everything by them. Problem is that the form is acting like there are no files selected ...
0
votes
0answers
18 views

Drupal 7 form only submits when logged in

I've built a form with Drupal 7 FAPI and it works perfectly, but only when I'm logged in as an admin. Otherwise, if you try to submit it without being logged in the page just refreshes when submitted, ...
1
vote
0answers
13 views

Programmatically loaded taxonomy form ajax errors

I load a taxonomy term in the edit form via the following code: module_load_include ( 'inc', 'taxonomy', 'taxonomy.admin' ); $vocabulary = taxonomy_term_load ( $tid ); $form = drupal_get_form ( ...
1
vote
2answers
65 views

How do other modules update elements using AJAX callbacks?

I have a block, of which I want to update the contents via AJAX. So the block is: $block['subject'] = t('My Block'); $block['content'] = '<div id="block_wrapper"></div>'; And the form ...
1
vote
1answer
36 views

Using hook_form_alter on an existing form element in Drupal 7

I'm using the Commerce module and in the checkout process I'd like to change the size of one of the input fields. I'm trying to use the following code but it doesn't seem to be working. Am I doing ...
0
votes
0answers
9 views

The array $form_state undefined with ajax

Why when I submit form generated with ajax, the array $form_state is undefined? this is a part of module: 1) $form['#tree'] = TRUE; $form['addTel'] = array( '#type' => 'submit', ...
3
votes
1answer
34 views

How can I draw a donut chart based on the number of specific fields on a form?

Is there a module that can count results in a form, and then draw a donut chart like the following picture? Note that I'm actually using content types and Views to create such forms (so I'm not ...
3
votes
1answer
21 views

Grab Data from non form elements and send as POST using AJAX

I am looking for an alternative solution to the way my form is being submitted right now. The problem is that the validation function does not work because I gave the submit button on the form an ...
0
votes
1answer
19 views

How i can add a new line in my code here?

HI guys go to THE TEXT THAT FOLLOWS I WANT IT IN NEW LINE and help how to separate that text in 2 lines $form['kkkkkk'] = array( '#type' => 'textfield', '#title' ...
0
votes
0answers
26 views

Remove button field of a field generated by AJAX

This is my custom Drupal module. I have a form containing text fields, each with a button to remove the field from the form. The problem is that the remove button always removes the last field, ...
1
vote
0answers
14 views

How do I load the $form_state for a form loaded with drupal_get_form?

Or is drupal_get_form not the right way to go about loading node forms where I want to also get the $form_state? The reason I am asking is I would like to be able to place multiple node forms on the ...
1
vote
2answers
28 views

Get Div's Text in Drupal Forms API

I have this code below: $form['id']['mypreview_modal'] = array( '#type' => 'item', '#markup' => '<div id="mypreview_modal" title="ID Preview">12345</div>' ); ...
0
votes
0answers
21 views

Multiple Fields Custom Form not saving default values?

I tried to create multiple fields with values on it using custom form which allow users to add data as many as possible. and then I can populate from there, but I tested submit and the default value ...
-3
votes
0answers
24 views

Checkbox with key as 0 unselected automatically

as you can see in my question In my checkboxes if i have a 0 value it select this checkbox i solve my problem but now if i select emergency with key == 0 it also unselect this checkbox any ideas??
0
votes
0answers
10 views

Drupal put more values in #markup $form type [duplicate]

Is it possible to add more values into the #markup of a drupal form? At the moment it is a link but I also want to add an image. When I add another #markup it only takes the last one, and when I add ...
0
votes
0answers
7 views

How can I get the functionality of the search page form in a block?

I'm using this right now to get a search form in the page header <?php $form = drupal_get_form('search_block_form', TRUE); ?> <?php print render($form); ?> However when you go to the ...
0
votes
2answers
14 views

Configuration form settings

I would like to create a settings page for a user which allows them to save the options of a list which is to be used in a custom form. The list is called marketing source and it is added to a form ...
0
votes
0answers
16 views

How to hide row cell when using table in forms?

I have a field widget that has multiple values per field and some are values or other form types that do not render any visible data. I want to use the table element to encapsulate these fields into ...
0
votes
3answers
52 views

How to add extra submit button to content type edit form? [closed]

Hi Im working in a project, which have 2 content types, I had created a custom template for edit the content type, I would like to add a extra submit button when the user is editing it and if the user ...
0
votes
1answer
18 views

Page arguments - hook_menu

I have this two test menu items: $items['test/%id'] = array( 'title' => 'Test', 'type' => MENU_LOCAL_TASK, 'page callback' => 'drupal_get_form', 'page arguments' => ...
0
votes
1answer
16 views

Create a secondary form to fill data into an entity

I've an entity that models a contact (I'm using RedHen CRM) and obviously I can fill the data from the usual admin form. But if I want to publish another form for non admin users to insert their data ...
0
votes
0answers
18 views

I have a huge problem with the form

I want a form with checkboxes that will have all the severity levels and when the user (e.g selects only the error i want to select only the errors from watchdog. My problem now is that in watchdog ...
0
votes
1answer
12 views

how to customize Registration form

How to add a fields into custom registration form in drupal7 and how to give the link so that annonmous user can register.
1
vote
1answer
28 views

Custom form module

I have created a custom form named user_form_expiry, how can I access that form from the admin panel similar to other Drupal's built in forms like user_register_form?
0
votes
2answers
25 views

How to find the default value or change state of a Drupal 8 form element?

I'm putting together a fairly complex form with Drupal 8 (currently building on beta 7). In my validation function, I need to be able to detect whether a field, which was populated with default ...
0
votes
2answers
31 views

Creating node and user with one form

I have a content type, 'A'. Now I need a form with the user registration form fields plus the 'A' creation form fields. So when the user (annonymous) submits this form, a user and a node of type 'A' ...
1
vote
5answers
154 views

How can I disable a form's default validation functions?

I have created my own validate handler: /** * Validate handler. */ function my_module_validate($form, &$form_state) { $values = $form_state['values']; if ($values['type'] == 'line') { ...
0
votes
1answer
14 views

Preventing Authors from entering pre-formatted text into filtered html field

I have a form for my authors to use when entering records. The form has a 'filtered text' description field that also use WYSIWYG. I'm noticing that some of my authors enter 'bad' text. What I mean ...
0
votes
1answer
16 views

How to change “New content” text in entity connect autocomplete edit/add buttons?

using entityreference autocomplete widget (field-widget-entityreference-autocomplete) with entity connect I have the buttons "New content" and "Edit content". How can I just rename them in "New" and ...
0
votes
0answers
28 views

Anonymous Usernames

Good day to you! I want to let anonymous users create content on website. But when I allow them create some node type, I noticed that they cannot specify their username. I can add new field for ...
0
votes
1answer
21 views

Clean url for custom query parameters

I have a custom filter form in my site and the form submitted by the filters adds 2 Get variables to the url. However, the variables appear in the form of: ...
0
votes
0answers
8 views

How to insert an entityform in a custom form?

I'm building a multi-step form in Drupal and in one step I want to insert the fields of an entityform. What I've done is: module_load_include('inc', 'entityform', 'entityform.admin'); $entityform = ...
0
votes
0answers
14 views

How to connect/combine two specific content from different views

I have two views. Inclusions and Add-ons. On the form, the user will choose an Inclusion first, and then the user can chose an add-on, these items are displayed using views and the select button ...
0
votes
2answers
15 views

Results table with form select for filtering

I have a page set up via a custom module, which contains some data rendered in a table, not using views. I didn't use views because it requires some various calculations that views calc couldn't do. ...
0
votes
0answers
35 views

How to print custom form on a tab in user profile page?

My problem seems to be related with my theme function not being called. $items['user/%/car/form'] = array( 'title' => 'Car', 'description' => 'Cars', 'file' => ...
0
votes
1answer
37 views

Ajax Callback Function in Submit Button Doesnt Work

I have a submit button in my form and I want to implement it using ajax: function myid_user_page_form(){ drupal_add_library('system', 'drupal.ajax'); $form = array(); $form['id'] = ...
1
vote
1answer
24 views

using hook_form_FORM_ID_alter with #states

I am trying to use checkboxes to display inline entity form elements only when the boxes are checked. However, my code doesn't seem to be working. It will hide the element, but when I toggle the ...
0
votes
0answers
13 views

Filter in $form table not working with pager?

I'm trying to add a filter to my table which has a pager. It does work but only for the 1st page. The pager keeps saying (for example: 4 pages) and it should be only 2 after adding the filter. My ...
0
votes
2answers
28 views

Call a Javascript Function and Update my Form Element at the same time

This is my ajax callback function function myid_search_idnumber($form, $form_state) { return $form['id']; } It updates the values in $form['id']. But Because I wanted to call a javascript ...
1
vote
1answer
20 views

Using #states API with an image field as a control field

On a form, is it possible to use #states to hide/show a field based on whether or not an image field has been filled in? More specifically, I'd like to get this node form: to only show the "Show ...
1
vote
1answer
29 views

How to embed plugin configuration form elements into another form?

I have a form that lists entities and each of the entities has a checkbox. The form also contains a list of actions(Action plugin) that can be performed on selected entities as a select list. I would ...
1
vote
1answer
21 views

Move fields on User edit page between pages

I am using Simple News, which changes the user/1/edit page by adding a new "Newsletter' Page" that is at user/1/edit/simplenews ("1" can be any userId). This page has a Newsletter option field. I ...
0
votes
0answers
12 views

Pager not working when $form['table'] is called with AJAX

For a statistics page I let users select the right file in a select list. After that I generate a table with stats. This table also has a pager (that worked without the ajax part). Now I did ...
0
votes
1answer
31 views

Kick Out Form builder module

I have install Form Builder module and Webform module. Webform module: Create form feature Form Builder: Integrate into webform for more friendly user by click and drag Recently I realize form ...
0
votes
1answer
12 views

Is a custom module the best way to build out a Form with full custom AJAX?

I have a project (problem) I've been thinking about for about a week now. When it was first presented to me it seemed to be a very easy solution, and frankly there are easy ways to accomplish this, ...
0
votes
1answer
29 views

$form table displays no table data

I just made a $form['table']. It shows enough rows (the count of the total rows in database) only it doesn't show the results. I tried using #value, #title, #markup but nothing works Screenshot of ...