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

learn more… | top users | synonyms (1)

0
votes
1answer
10 views

Unwanted data show after add password-comfirm

In my form I would like to add comfirm password field, the pic below show is before adding comfirm field, there is no data in waiter name field, after adding comfirm-password field there are data in ...
0
votes
0answers
7 views

Create a names and email field on comments in D6

I am trying to add extra fields onto the comments box in d6. Have tried this in my template.php file function mythemename_form_alter(&$form, &$form_state, $form_id) { if ($form_id == ...
0
votes
0answers
9 views

getting friends details from fboauth and display in form

I am using Facebook OAuth (FBOAuth) module to get list of Facebook friends. I have created a fboauth action which import the friends, then I create an array which contains details of friends (details ...
1
vote
1answer
24 views

How to prevent drupal form's managed file upload ajax field from resetting the $form_state?

Edit: working code, although pretty ugly: if ( isset($form['submitted']['stelle']['#default_value']) && $form['submitted']['stelle']['#default_value'] !== '' ...
0
votes
2answers
14 views

Remove AJAX in views form (on change)

I have a problem with a views form. It should only be submitted when I hit the submit button. Currently it is submitting when I change a value in any textfield. When I select "Using AJAX: no" it ...
0
votes
0answers
13 views

Render module form to node template

First of all, I dont want to use the drupal five star widget, as I have special requirements to star animations and stuff... I try to generate a voting block element, that uses AJAX to send the vote ...
0
votes
1answer
14 views

Custom form register

i have any fields form register user drupal 7. I want to when user choice select box : User 1 or User then any fields hide or show. Please help me Thank to all.
0
votes
1answer
38 views

How to prevent newline character in textarea

I'm building a form in a module for Drupal 7 and I want to add a textarea as I would like it to be multiline so that text overflows on the next line, etc. but I don't want users to be able to create a ...
0
votes
0answers
17 views

Forms - Multiple Checkboxes Default Values Not Populating

I have a Drupal 7 form using multiple checkboxes. The default value is based on a session variable. However, if I uncheck all of the boxes, I still have a default session variable but it is not ...
0
votes
0answers
8 views

Form API: fomatting the date select lists?

I'd like to format my date select input, using the following time formats: 12-hour format of an hour without leading zeros Minutes with leading zeros Here's my form definition: ...
-1
votes
0answers
17 views

Drupal user register form not setting error class after form submit

I am making an user register form tpl after defining it in the template.php but when i submit the form with some required fields blank it is showing the error message but not adding the error class in ...
0
votes
1answer
15 views

HOOK_node_submit funtion not working in custom module

I recently upgraded a drupal installation from 7.15 to 7.31. All seemed to be working well but as I went through testing features I noticed one of the template forms for content submission wasnt ...
0
votes
1answer
9 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
22 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
24 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
11 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
19 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
20 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 ...
0
votes
0answers
15 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
38 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
30 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
14 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
44 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 ...
0
votes
1answer
30 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
46 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
21 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
14 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
22 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
86 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
37 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
20 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
167 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
82 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
49 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
30 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
99 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
23 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
47 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 ...