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

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

get field type of all field from create content page [on hold]

I want to check filed types of all fields present in my create content form in codes. How can I do that without any hardcore filed name?
0
votes
0answers
26 views

How to get $form_state['values'] after a drupal_get_form() call?

I have an form in a block with ajax submission. The block view code calls drupal_get_form, adds some other info, uses a custom theme tpl to create the block. I want to replace the form in the block ...
0
votes
0answers
8 views

views field - load dialog form to update single field value

Views of articles with tile field and the image field is shown to user. I need to load dialog form to modify empty imaged field with text "add image"(or any other cck field). I know how to set path ...
0
votes
0answers
16 views

Appending a submit handler to user_pass_submit to enable form redirect after submission

If I understand correctly, having $form['actions']['submit']['#submit'][] = 'my_extra_submit'; in a hook_form_FORM_ID_alter would execute my_extra_submit after it executes the default handler. ...
0
votes
1answer
34 views

Entityform - “The form has become outdated.” error

I have an entityform that appears on a page, for some reason the form will not submit ... // implement hook_menu function foiagen_menu() { $items['node/%node/foiagen'] = array( 'title' => ...
0
votes
0answers
9 views

Dependent Selects to feed on taxonomies

I'm trying to create a module that generates a block with Dependent Selects to feed on taxonomies, I mean the first would be the term father Select first level and then display a Select with the ...
0
votes
2answers
40 views

Commerce checkout form all pane errors to be displayed on top of form

I am using latest commerce module with D7 site. By default commerce displays form errors inside individual commerce checkout form panes. This is designed by default and every pane has it's own ...
3
votes
3answers
47 views

#states does not hide #suffix in a form

I am new to Drupal, so please be fair with me :) I am trying to create a custom form using FAPI. The code is as follows : $form['format_document'] = array( '#type' => 'radios', '#options' ...
0
votes
0answers
24 views

Removing Anonymous DIV from search-block-form

I have created a sub theme under Bootstrap and am having issues removing the "anonymous" div from inside the form. Here is the displayed code: <section id="block-search-form" class="block ...
0
votes
1answer
28 views

Set select list option value

I'm trying to set value of select list programmatically with hook form alter I have select list with options: $options = array(125 => 'USA'); and setting value like this ...
0
votes
1answer
32 views

Enable/Disable field values based on another field's value

I am using Drupal 7 with the Entityform and Conditional Fields modules to build a form and need to see if it is possible to disable a value in one field based on the selected value of another field. ...
0
votes
0answers
28 views

AJAX submission from html.tpl.php?

Is it possible to have an AJAX form referenced from html.tpl.php? When I have it on this template, then the form doesn't submit via AJAX, only a normal POST request. I'm rendering the form like so ...
0
votes
1answer
34 views

Form and Textcontent in Block

I'm having problems with adding a form and text-content into a block. To get both, form and text, into my block, I use render() on my form, but I read, this isn't the best way to do, but don't found ...
0
votes
1answer
22 views

Adding Pagination to to custom form block results

I have created a custom block that has a form which has a list of result and I wanted to know how to add pagination to the results Thanks for any help on this Colin
0
votes
0answers
18 views

Pre-Fill the Customized Registration Form which populates the existing values in the field

On my site, we want the user to search his personal information through an email and then go to Registration Page for my modification. If the email is correct, the Registration form should pre-fill ...
0
votes
1answer
55 views

Building EntityForm in Drupal 8

I'm continuously getting the error: Drupal\Core\Config\Schema\SchemaIncompleteException: Incomplete or missing schema for mymodule.myentity.myentityname in ...
0
votes
2answers
40 views

Drupal create duplicate registration form with extra fields

I have a site built using drupal7. The site has a registration form now. There is a new requirement now for add a couple of new fields in the registration form and put it in a new page. ie ...
0
votes
3answers
49 views

Debugging what has been submitted in a form

I would like to like to be able to print out what has been submitted in my form in the submission form. How can I achieve this?
0
votes
1answer
28 views

Getting '#default_value' from $form

I have this code: $form['custom'] = array( '#title' => t('Some title'), '#type' => 'select', '#options' => $custom, '#default_value' => isset($option->name) ? $option->name_id : ...
1
vote
2answers
58 views

Drupal 7 : Programmatically validate form by form ID

Intro - i am trying to implement Sales Force form within Drupal FAPI but now it requires to add captcha so i need to send first request to internal page so i could validate captcha and only after this ...
0
votes
3answers
56 views

HTML after label radio button (depending on radio button)

I need to add some html to specific radio buttons. This is a picture to clarify what I'm looking for: As you can see I want to add some text to the options. These are radio buttons where you can ...
1
vote
2answers
48 views

How can I do math on fields?

I am trying to learn the principals required to make a Drupal 7 math/calculator module that simply takes user's inputs and does some math on them and then displays the results on the same page without ...
-1
votes
1answer
32 views

Translate a form

I've installed i18n module for taxonomy translation,and I have set in translatable mode. What I need is to have a form with some checkboxes in a multilingual site. I'm able to obtain that ...
0
votes
1answer
36 views

Programmatically add PDF file to user

So using the 'file' module i have added a field to the user table called 'user_files'. What i want to know if how can i programmatically add a file to the user, so that it is displayed on the users ...
0
votes
2answers
44 views

Job Application [closed]

I have a content type called "Job", that has fields for the job and an email field for the job contact. At the bottom of each job node there should be a button "apply now". If you click on the ...
0
votes
2answers
94 views

What hook gets called at the formation of a form? (hook_form_alter called for adjusting a form)

what hook gets called at the formation of a form. I'm trying to add some additional mime types to form with id file_entity_add_upload but my hook_form_alter is getting called after these are ...
0
votes
1answer
10 views

Drupal: showing different page layouts based on form data

I'm trying to build a multi step form. Before the second step I have to process the data inserted in step one and display different layout and form fields based on the results. I use ...
0
votes
1answer
49 views

Webform confirmation message on same reloaded page

Webform has option to reload the page when submitting the form, but it just refresh the page and doesn't show any confirmation message that the message was sent etc. This might look misleading for ...
0
votes
3answers
45 views

Error: Undefined index: form_build_id in ajax_get_form()

I have a custom widget form that I use on a node reference field. The form outputs a list of nodes with a pager (jQuery Infinite Scroll plugin to append next results using the pager links) which can ...
2
votes
1answer
47 views

Update url query upon form submission

I am trying to append a variable on the URL through a custom submit function. Is that possible? My issue is that I am coming to the node/%/delete from different pages. I want to modify the delete ...
0
votes
0answers
10 views

drupal commerce: issue with add to cart form and translated products

Hello I have some transtaled products with some attributes, those attributes are also taxonomy terms translated, I have a language switcher. The "add to cart form" on the product display do not works ...
0
votes
1answer
48 views

Term reference field lists the terms for all the languages

srry if the title of the question does not make too much sense... What I meant is that I have the i18n module installed and configured for content and taxonomies, this is what I need I have a ...
1
vote
1answer
18 views

Select list with input fields

I would like to have the following field widgets: I would like to give the user the possibility to give in 4 nicknames and select the default one that will be shown to other users. Is there a ...
0
votes
2answers
45 views

Prefix html before radiobutton (input field)

I'm looking to insert some extra html before an input radio button. This is my html now: <div id="edit-field-geslacht-und" class="form-radios"> <div class="form-item form-type-radio ...
0
votes
0answers
42 views

It is posible to change the css (background-color) of an html code with ajax in a form?

I've done the next form. That has the next code. $form['secciones']= array( '#type' => 'vertical_tabs', '#default_tab' => 'edit-tab2', '#prefix'=>' ...
0
votes
1answer
28 views

Add html to registration page

I have a registration form, and in the beginning of my registration page I want to show a title, subtitle and an image. A wireframe is like this: As you can see there are checkboxes (select field) ...
0
votes
0answers
34 views

Form ajax populate select list using REST

I am having trouble with two things in this form. I am using form_state with AJAX to do a cURL to a webservice based on what they user selects. So if they select "project" it will show only ...
0
votes
1answer
38 views

Newbie Form Question: I'm only getting hidden fields

I am trying to produce a form that only consists of 1 button. I have created a tab in the user menu screen with the following... $items['user/%/user_options'] = array( 'title' => ...
0
votes
1answer
45 views

How to add an editable text box to a page

So i have created a page which uses an XML feed to generate some output. I want to be able to add a textarea from the FORM API so that i can allow user of my site to enter some details on to the form ...
0
votes
1answer
47 views

Drupal Boolean Field

I have a boolean checkbox field when displayed on a form it produces the following html snippet: <input type="checkbox" id="edit-field-is-ipa-und" name="field_is_ipa[und]" value="1" ...
0
votes
0answers
32 views

Make new ldap users from a form

is it possible to make a form (e.g. with webform), and then, when a user fill the form, it adds him on an LDAP directory ?
0
votes
1answer
38 views

AJAX Calculator

I'd like to have three separate but interconnected calculators that generate their output with AJAX (i.e., no page refresh). Would this process work or is there perhaps a simpler/more trodden pathway ...
1
vote
1answer
37 views

Add taxonomy term in popup

I have a select list with some options. But now I also want an option Other. And when you select the Other option there has to open a pop-up screen with the add term to vocabulary form in it. The term ...
0
votes
1answer
78 views

How to trigger hook_form_alter() on my custom $form?

I have written a custom module which builds a custom user_profile_form(): mymodule_user_profile_form($form, $form_state, $user) { module_load_include('inc', 'user', 'user.pages'); $form = ...
0
votes
2answers
50 views

How to prevent double form submission in drupal

How to prevent double form submission in drupal when i create basic page and click submit 10 times.. then node create 10 times of same content please suggest me, how to prevent
2
votes
1answer
42 views

Form API #states with #default_value?

I have a form which has a select with a #default_value which get's set when the user has errors/has filled out the form. Then I have two fields with a #states that show them when the select has a ...
0
votes
0answers
18 views

method replace dosn't work in ajax form

I've a select form that implements ajax. When the value of the select change an other form has to change. You can see in the next code. $form['a1']= array( '#type' => 'select', ...
0
votes
1answer
20 views

Image as form submit

I am building a custom form inside a block that has a clickable image as submit. Here the screenshot of the outcome: Here is the form code: function my_form($form, &$form_state) { $image = ...
0
votes
1answer
27 views

Get form select field values from view

I'm struggling to find a working method for populating the key & value pairs of a select field (created with forms api) with data from a view. e.g.. I have a view of 'location' content types. In ...
0
votes
0answers
19 views

ajax form element with normal submit

I need help/suggestions with ajax forms. I have a simple form, with a few elements and submit button. What i want to do is save each form field async. with ajax before user submits form. A have a ...