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

learn more… | top users | synonyms (1)

0
votes
1answer
14 views

Allow user to fill out node form, then force registration

I'm making a classified website. Have a button that say "Make a ad" I would like the Anonymous user to be able to fill in the text for the ad. But the Anonymous users after filling in advert. has ...
0
votes
1answer
17 views

I would like to create a database of dogs [on hold]

I'd like to create a custom site but I don't familiar with drupal and its plugins. So my Idea is I have two kind of users: owners and breeders And an another table I have to store the dog details like ...
1
vote
2answers
19 views

change the list option based on the selection type

In a form, user have an option to choose the submission type. Based on the selected submission type, user should get an option to choose sub-type. Please let me know how this is done in Drupal 7. ...
0
votes
0answers
13 views

hook form alter with hidden field, throw an error

I try to alter taxonomy edit form. This is my hook: function MYMODULE_form_taxonomy_form_term_alter(&$form, &$form_state, $form_id) { // hide the desciption field and relations group ...
0
votes
1answer
12 views

Drupal 7 Captcha on the user_login_form and user_pass form?

just checked on my site and it seems that certain login forms do not have captcha. specifically the form named: user-login-form user-pass I put in user_login_form in the captcha page to make it ...
0
votes
0answers
11 views

How to sent form data to paypal site [closed]

I have create a form like below image. so how to sent all selected data to paypal (https://www.paypal.com/cgi-bin/webscr) site when I submit the Donate button.
-3
votes
0answers
19 views

Drupal reload site after submit [closed]

Part of a code: $node->field_oa_worktracker_task_status['und'][0]['value'] = 'open'; node_save($node); ------AND NOW code for reload!!
-2
votes
0answers
19 views

How to add form in to node view

I want to add one form link in particular node view . means in my site many content creater/node creator if anonymous user want to contact with node owner, so i want to attach form link in node view ...
0
votes
0answers
18 views

Custom theme for form checkboxes causes AJAX behaviors to not attach

I have the following code implemented to override the theming for the checkboxes in a Drupal form. //themes neighborhood checkboxes with AJAX link wrapper function ...
0
votes
0answers
20 views

Textfield values not being stored on form submit

Ok, so I'm working in Drupal 7 and am making a form that either inserts values in the database or updates existing information in the database. Each row of my table has two entries, 'counter_name' ...
1
vote
0answers
15 views

How to check if a form is being rebuild?

I want to perform a function if the form is being rebuild. i.e. If validation fails, or Form is rebuild for any other purpose. I do not want the function to run in any other case. How can I do ...
-2
votes
0answers
31 views

foreach form element doesn't work [closed]

i have this hook_form_alter $tassonomia = taxonomy_vocabulary_get_names(); foreach($tassonomia as $rec){ $vid = $rec->vid; $array_val = array('0' => '--none--'); $tree = ...
0
votes
1answer
17 views

Conditional markup field display

I have content type with a term reference field. Let's call it 'Color'. I want the content type to display markup depending on which term has been selected in the term reference field. For example, ...
1
vote
2answers
31 views

Trying return array as page content

I'm working on a module in Drupal 7. I have three different forms set up with hook_form. I would like to display the three forms on one page along with some html to organize the forms and apply some ...
1
vote
1answer
25 views

load field value to custom form

I'm using Drupal 7 for my website. I created custom settings page with custom form in it, but the problem is I don't know proper way to load inserted value from database to my form after saving it, ...
1
vote
1answer
18 views

Set value in $form_state['storage'] seems to change before validation

I am sure that I do not understand something fundamental about Drupal's form API but I hope that someone can help me with that: I want to create some kind of custom CAPTCHA as the CAPTCHA module ...
-2
votes
0answers
23 views

How to save Webforms submissions to my own database

I have used Webforms to create a form. Now I wanna use that input details in a database of my own .. and it should get inserted the way I need, I mean fields and all. So is there any way I can forward ...
1
vote
1answer
20 views

Is there a way to add clauses like accept = 'image/*' to input items via forms API?

I'd like to add "accept" attributes to some of the input fields for my site's content types -- to end up with something like <input type="file" id="edit-field-whatever-und-0-upload" ...
0
votes
0answers
12 views

Commerce add attributes to add to cart dropdown

I am wondering if there is a way to add fields to the product add to cart dropdown. For example currently it is Product ID => Product Title I want it to be something like Product ID => ...
2
votes
1answer
28 views

Layout custom forms using Panels

Can I use the Panels module to layout a custom form? I've created a custom form and I'm loading it in a menu callback using a function like this: function _MODULE_menu_callback_function() { return ...
0
votes
0answers
17 views

How to set default value of select list field on add node form?

I am trying to set the default value of a select list field on a node add form. The field name attribute in the HTML of the form is: field_state[und] The ID of the add form is: ...
-1
votes
1answer
34 views

Click event not always fireing in Drupal behaviors

I'm having a strange problem with a form. Sometimes I have to click the submit button twice to make it submit my form. It also seems to work if I click outside the form before I click submit. The form ...
0
votes
0answers
20 views

Show message after form submit, render where?

I'm building a form inside a module. Upon successful submit of the form, I want to display a message to the user. I'm unsure of how to do this the best way. Right now I', calling: ...
-1
votes
2answers
17 views

How to let user add multiple sub-content fields in the main content?

If I want user to create a main content which can be able to add multiple sub-content for example I wanna do apartment renting website. User have to create the apartment details which contain these ...
0
votes
3answers
21 views

Redirect from edit page and prepopulate form

I would like to redirect user from node edit page to node add page but with prepopulated form. So all fields of the form would be pre-filled with copies of values of node edited before. Is there a way ...
0
votes
1answer
19 views

In a group content add form, the og_group_ref is empty, except for the “_none” value

This is only for non admin members. Administrators have the field populated, but logging in as anyone that isn't in that role produces an empty field, except for the "_none" value. I've tried adding ...
0
votes
0answers
19 views

Panels 3: Custom form elements on node/%node/edit page

Is it possible to add custom form elements to node form, when the node form is rendered in panel? I am using panel page node/%node/edit. When I add content to a region, I select Form and there I ...
0
votes
1answer
16 views

altering them for node edit page not working

I got the following to work by adding it to the admin template.php file. But I am not having any luck changing the one edit form to use boostrap_subtheme vs the default admin theme. Any advice with ...
1
vote
1answer
18 views

n00b question, form callback and form_alter

My highly-n00b question is: suppose I have a form callback which could be used as argument to drupal_get_form(). How can I specify an ID for the form so I can compare it inside hook_form_alter ...
1
vote
0answers
31 views

How to get/provide tpl file of editing a field collection?

I want to theme a my collection field on the edit page. I have several fields in one collection and that collection gets all the height of the screen. Though, I want the values of the collection ...
0
votes
0answers
16 views

Redirect edit link field to a custom form in views

I've this view. I need to redirect the edit link to a custom form to edit a node. How can I change the path to insted going to the predeterminate page go to my form?
0
votes
0answers
21 views

“Username field is required” error at registration, nothing in log [closed]

If a visitor try to register here https://wear-freaky.com/user, filling all forms correctly and clicking to submit, the error message "Username field is required" appears and no log error is created. ...
0
votes
1answer
14 views

Redirect to page in form submit and use the form data in new page

How to redirect in drupal 7 in form submission, I need to use the submitted data in next redirected page but below video_subtitle_view function is not printing anything How do i do it /** * ...
0
votes
0answers
30 views

Hide field help text in a particular page

Is there a way to hide the help text for certain pages?
1
vote
4answers
115 views

How can I theme a form “checkboxes” element?

I've got a checkboxes field displayed on the user profile form. I'm trying to restyle that field to put the description BEFORE the checkboxes. That seems like it should be a simple thing? So far I've ...
0
votes
0answers
11 views

Copy value of field into the value of a different field in features

I have exactly the same question answered in here but I want to do it in content type in features. I have custom content type generated by features module and I want to copy value of ...
0
votes
0answers
21 views

Form API: completely custom tableselect?

I need a table that'll have some rows tableselect and some not, also it I should be able to set properties on specific rows and cells, not just inputs. Row can have 1 or many values. Is that possible ...
1
vote
1answer
25 views

Keep custom theme when using AJAX submit

I am using the following code to switch to a custom theme based on the URL function job_agent_custom_theme() { if (arg(0) == 'vista') { return 'vista'; } } This works great and will switch ...
0
votes
0answers
31 views

Ckeditor 4 problems with Forms elements

I'm trying to add form elements with CKeditor 4 like: form checkbox List item List item radio List item text field text area selection field button image button I can't find the option in the ...
1
vote
0answers
29 views

What token should I use while sending email when I am programmatically adding the content?

When I fill the form. I get this email A new Event "Event name" has been created. To approve this Event please go to http://websitename.com/content/content-name and click ‘publish’. I have ...
0
votes
0answers
31 views

Radiobuttons next to an image

I'm doing a multistep form and I need to add images next to radio buttons. The radio buttons has the description and the image show what is the option. Now I have the radio buttons list Now I ...
0
votes
1answer
31 views

Module has conditional Checkboxes, need to remove value

I am building a module that will have a bunch of checkboxes to enable the addition of metatags like HandheldFriendly, MobileOptimized, etc. I want to have the first checkbox only displayed. Upon ...
2
votes
2answers
136 views

Use code to automatically fill the form of a content type

I have a content type called Event. I advertise events on my website using this form. I want to advertise automatically using code. I have this code which when I run automatically add content. But at ...
0
votes
1answer
24 views

Taxonomy vs Values module in my case

I'm using the Values module for creating a list of subscriptions the user can choose of when they register (it's a field in the registration form). Now I've seen I can also create a list with the ...
1
vote
2answers
45 views

Auto fill title

I'm trying to auto-fill the title a content creation form in Drupal 8 with the user ID of the person creating the node, but I can't seem to get past step 1, which is having the title default to ...
0
votes
0answers
19 views

Entity forms : Can't assign the new field to parent 'group'

I working on web based diary, In the diary there are 21 days where every day is a Parent 'Group' with field type Vertical tab. Every day has 16 fields which are same for every day. I am able to ...
0
votes
0answers
56 views

Image with cropping programmatically in a form

I'm doing a custom module, and I need to add a new field: image with cropping programmaticaly into a form. I know how to add from the content type but I need to do it programmaticaly. It is posible to ...
-3
votes
1answer
48 views

Add new field to core module by overide drupal 7 [closed]

I want to add one more field of Sex (male/female)radio button in core Login Form Module. How do i achieve this by override.
2
votes
1answer
80 views

When using hook_form_alter to modify a content type's node add / edit form, where do I put the #states property?

This is actually a compound question. All in all the question is: When using hook_form_alter to modify an existing content type's node add / edit form, where do I put the #states property, and, ...
1
vote
3answers
57 views

form submit handler is not called

I tried to mimic the multiple user deletion feature of user.module but for some reason the confirm form submit handler never get called. I don't know where the problem lies in. Following is a working ...