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

learn more… | top users | synonyms (1)

0
votes
1answer
7 views

user_profile_form doesn't show profile2 information

I'm trying to modify the user_profile_form, but it isn't working. My regular user edit information shows up, but not my profile2 information. function MY_MODULE_form_alter(&$form, ...
0
votes
1answer
21 views

how to make a custom module that has three forms on one page

I know how to make a module that has one form : http://www.wdtutorials.com/2012/04/26/drupal-7-how-create-forms#.U_YI1WNab3s But how can I make a module that contains three different forms on the ...
0
votes
1answer
19 views

Adding drop-down and radio buttons

Is there any module that will help me create a drop-down menu and list as shown in the following picture ? I want to connect this with registration page.
0
votes
0answers
10 views

drupal_add_tabledrag dragging but not dropping

I am trying to use the drupal_add_tabledrag in a form table, the dragging is added fine, but dropping is not working $entity_ids = range(10,20); // Loading dummy data $entities = ...
0
votes
1answer
19 views

clean URL and slash after index.php in drupal 8

Drupal 8 does not send any form. Stores only if you write through /index.php/ example: site.com/index.php/config That would be needed to site.com/config There is the idea that it's something with the ...
0
votes
1answer
18 views

Pop-Up E-mail subscription ( module) or appearing form?

Is it possible with a certain module or anything of that nature to have a pop with a subscription email-collector inside? I'm on the final touch-ups of the site and have basically got this left and a ...
0
votes
0answers
9 views

Fivestar custom widget not picking up custom stars

I have a content type with a fivestar field. I then have a custom modules that renders a text area under the stars. I want to change the stars and make them pink (for example). so I have copied one of ...
0
votes
2answers
39 views

Submit form when field value changed

I have a simple form with method GET as follow... function MYMODULE_form($form, &$form_state) { $form['#method'] = 'get'; $params = drupal_get_query_parameters(); $form['cat'] = array( ...
0
votes
1answer
19 views

Saving a value from Javascript on Drupal form submit

I have a jQuery map that I've built that allows users to select states and counties. This is all done in Javascript. I would like to, on form submit, take this data and submit it to the user's ...
0
votes
2answers
13 views

Is there a module that would allow me to reorganize the way fields are displayed for a content type form?

When I create a particular content type, Drupal generates a form for me with all the appropriate data entry fields. However, the form is not particularly attractive: all the fields are displayed one ...
-2
votes
1answer
21 views

How to create form slider with 5 values [closed]

How to create form slider like the screenshot.
0
votes
0answers
12 views

Nested forms in Drupal 7

I have an ajax based multi step form with 5 steps. After the form has submitted I use drupal_goto to redirect the user to a thank you page. In the last step is a select list with payment options. I ...
0
votes
2answers
28 views

Set conditonal default value of a field

I have a custom form with a field... function mh_integration_connect_form($form, &$form_state) { $form['#method'] = 'get'; $params = drupal_get_query_parameters(); $form['cat'] = array( ...
1
vote
1answer
37 views

Drupal7 Get results from a form in a table

I want to show my result from the form in the table on the same page. //my form function find_tryk_filter_test_form_page($form, &$form_state) { $form['submit'] = array( '#type' => ...
0
votes
1answer
15 views

Creating a form with GET bypases the validation and submit

I am creating a simple form, when sumits, shows result from an external API. But URL remain the same, so you cant get a url if your search result and send it to someone. But when I use get ...
0
votes
0answers
9 views

How can I create a multi-column checkbox area for a specific page

I have a taxonomy term field in four of my content types that I am calling "methodological areas". It currently has quite a few items, 92 to be exact, which is a lot of items to display as checkboxes ...
0
votes
1answer
29 views

Ajax callback called on textfield typing

I'm trying to reach exactly the same state as autocomplete field does. When user is typing in textfield I'd like ajax to wait with its callback so the user can write all the text. I'm trying to ...
0
votes
0answers
13 views

Programmatically change input filter of term description on taxonomy_form_term

I couldn't find anywhere on the admin UI where I can change the input filter for term's description field. I have tried using hook_form_alter, but wasn't successful. function ...
0
votes
1answer
43 views

Issue implementing Ajax in form

I created a basic page which has a basic form and implements ajax, or attempts to do so. My issue is that it doesn't seem to be functioning as it should. What might be Ajax, only works after I press ...
-1
votes
0answers
21 views

Error form upload file [closed]

My form upload for file pdf upload <input type="file" id="edit-field-document-und-0-upload" name="files[field_document_und_0]" size="22" class="form-file"> first time i can get file --> ...
0
votes
1answer
28 views

Get selected value and submit a form

I have a form, and I want to get the selected value of $form['dropdown_third'] and then use the value to create my table. What should I write in Submit function? function ...
0
votes
1answer
17 views

Contact Form in custom Theme

I need to create one request information form that goes to each page in my website. That means I need to add that form into page.tpl.php page. Form includes just basic information like name, email, ...
0
votes
1answer
25 views

Alter form button title

I use this to alter field labels: function ninesixty_form_user_login_alter(&$form, &$form_state) { $form['name']['#title'] = t('Name'); } But how do I change the title of the button? ...
0
votes
1answer
51 views

How to add another field collection instances on Add Form page load programatically

I have one field collection with unlimited values in Commerce Product Add form. After performing some action, When user redirects to Add Product form, based on some predefined values in session, I ...
0
votes
1answer
45 views

form rendering through tpl file

I want to render drupal 6 form through tpl file. for that 1. I have written mytheme_theme in template.php file and there I have define my template forms arguments and path for tpl file. I have ...
1
vote
1answer
18 views

Alter taxonomy autocomplete value

I need to alter the element value of a taxonomy autocomplete field before it is processed and can't seem to find a way of doing so. taxonomy autocomplete fields have an element validator attached, ...
0
votes
1answer
13 views

Can't set default value with hook_field_widget_form_alter()

function mymodule_field_widget_form_alter(&$element, &$form_state, $context){ if ($context['field']['type'] == 'node_reference' && empty($element['#default_value'])) { ...
0
votes
1answer
16 views

Drupal 7 form API auto submitting

I need help with making a drupal form. I've made the form and it works perfectly fine, all it does is capture the email, ip, and date and time of a user. The problem is I don't want the user to have ...
1
vote
0answers
8 views

Change workbench_moderation_state from select to radio

I have workbench installed, and want to change the moderation status dropdown in the add node form to a radio. But I don't get it. I have a custom module with a hook_form_alter hook which prints the ...
0
votes
2answers
84 views

When should one use #value_callback and when #element_validate?

I've tried to get into custom element creation but ran into problems with #value_callback and when #element_validate, more specifically their lack of documentation. Imagine you have a custom element ...
0
votes
1answer
36 views

form_set_error not showing error message on webform

I have created my own module and when i try to use form_set_error all im getting is the red border around the form input but no error message. here is my code function ...
0
votes
0answers
19 views

Adding tokens to autoreply message of contact form in Drupal 7

I would like to switch on the core's contact form category function and ad some extra category to my contact form but I was wondering that in auto reply I can't use tokens or acess the field values ...
0
votes
0answers
31 views

How to show a confirmation form in a modal to delete one entity whilst adding/editing a different entity/node?

I have entity 1 (E1), the main entity, in which entity 2 (E2) can be used/edited/deleted. I would like to be able to show a confirm_form after choosing to delete E2 in a modal whilst creating/editing ...
3
votes
2answers
161 views

Where to query database in a module

I'm creating a module that is basically a form but needs to use information from a table in the database to react the some of the button presses. Rather than executing the database query each time the ...
0
votes
1answer
72 views

How To Wrap Drupal Form API in html div structure [in my Drupal theme files (.tpl file)] [closed]

I have a webpage which is being rendered from my page.tpl.php , it has a login page at top - right of page. I am kind of struggling to wrap my LOGIN HTML FORM in Drupal Form API Below Links did not ...
0
votes
1answer
42 views

Use AJAX on a form with multiple buttons

I have a form that has two text areas and three buttons, "Copy", "Reverse" and "Clear". I would like the buttons to, respectively, copy the text from one text area to the other, take the text from the ...
0
votes
1answer
28 views

Pop Up login Forms for LoginToBoggan

I am using LoginToBoggan Module to unable anonymous user to register using self created password. Now in some other page I want a popup login form. I have tried using other module like modal forms, ...
1
vote
2answers
93 views

How does #value_callback really work (nested elements, …)?

EDIT: Separated 4th question. I've just recently started working with custom elements and already came across some weird behavior / questions I'd like to see answered. 1) How does #value_callback ...
0
votes
1answer
22 views

drupal7 custom form drop down show 0

I get a problem with my dropdown that shows "--select--","0","foods","meals" when I developing custom form with Drupal 7. The purpose of my dropdown is used to show "foods" and "meals" from category ...
1
vote
2answers
46 views

Auto-collapsing fieldsets on user_profile_form

I am following these guides: Customize the User Edit page in Drupal 7: https://www.drupal.org/node/2279959 Collapsing default fieldsets (Drupal 6): https://www.drupal.org/node/733198 Basically, I ...
0
votes
1answer
26 views

Webform Module and Elements Module

I have a hook that i wrote to include the elements fields (i.e, telfield) in a webform. The field doesnt take on the same css as the rest of the fields which means I probably need to add a style to ...
0
votes
1answer
38 views

Drupal hide form items completely with states

I try to hide a whole date/image/taxonomy block on my node form dependent on a checkbox. If use the following for my title field it works perfectly. The title field is hidden/visible dependant on the ...
0
votes
2answers
30 views

Form doesn't submitted [closed]

<?php //https://www.drupal.org/node/1806758 function mhzipcode_block_info() { $block = array(); $block['mhzipcode'] = array( 'info' ...
0
votes
2answers
36 views

Building Custom Forms in Drupal 7

I'm new to Drupal 7 and installed it on my local machine to play around. I'd like to build a basic Job Posting Form and wanted to ask about questions/best practices regarding Drupal. This was the ...
0
votes
1answer
35 views

How to make form update/rebuild every page load?

Part of my custom form that gathers petition signatures includes some markup saying "last signer: Bob, 3 minutes ago", looked up from a database. But if the user does not submit the form, eg they ...
0
votes
1answer
20 views

Form results not displaying - D7

Below is my code. Form results are not displaying below the form. What am I missing ? When I use print_r($form_state['storage']['results']); I'm getting the results. But it is not displaying in the ...
0
votes
0answers
23 views

How to add a Biometrics Fingerprint to a form using Drupal 7x

I am using Drupal 7x, and I need to create a form that must include a fingerprint scanned from an external device attached to the Computer... the fingerprint file must be saved with the form on a ...
0
votes
1answer
21 views

Drupal 7 hook_validate not called with custom form template

I received a pretty strange problem trying to customize custom form's template. So while form's template stay untouched (drupal core's form template was used) validation works just fine, but when I ...
0
votes
0answers
11 views

Move email form to different page and confirm password

Im trying to move the change email form to a separate page just like the chgpwd module does with passwords. However the form doesn't actually seem to do anything when submitted. I also want to make ...
0
votes
1answer
25 views

How do I render multiple form fields select boxes in a single row

I am trying to render three dropdown boxes to be on the same line using a tpl file. Here is the snippit of code I am trying to work with: $form_stuff = array(); $form_stuff[]=$form['field_list_1']; ...