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

learn more… | top users | synonyms (1)

0
votes
1answer
18 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
37 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
21 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
31 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 [on hold]

<?php //https://www.drupal.org/node/1806758 function mhzipcode_block_info() { $block = array(); $block['mhzipcode'] = array( 'info' ...
0
votes
2answers
28 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
31 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
19 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
0answers
18 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 ...
-1
votes
0answers
27 views

how to have an option field in the view [on hold]

Basically the project is to create a system for people who are want to hire people. every freelancer has a profile which is a content type. The people should be able to search for a freelancer using ...
0
votes
0answers
10 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
22 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']; ...
1
vote
3answers
47 views

Render alternative content if user is logged in instead of redirecting to user/uid

I have a menu router with type MENU_CALLBACK and it's 'page callback' property points to a function that implements render API, as follow: /** Implements hook_menu **/ function custom_render_menu() ...
0
votes
0answers
28 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
11 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
19 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
36 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
44 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
52 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
28 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
29 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
35 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
30 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
24 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
19 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
59 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
50 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
62 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
59 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
49 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
34 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
37 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
98 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
11 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
57 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
60 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
48 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
14 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
50 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
19 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
50 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
51 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
30 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
36 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 ...