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

learn more… | top users | synonyms (1)

0
votes
1answer
11 views

Is it necessary to embed captcha into the printmail form of print module?

I installed print module and it enables the users to send the node and its link to an email by redirecting them to a form. from security perspective is it safe to let them to do this with out captcha ...
0
votes
2answers
23 views

how to send variable to the javascript in Drupal

what is the easiest way to send a value from PHP to Javascript in drupal fom
0
votes
0answers
10 views

module_form_submit not working from template (.tpl.php) file

I have added a template file for one of my modules, I have also implemented the form api to get buttons inside the file. The buttons appears on the page but re-direct to the same page, as if the ...
0
votes
0answers
3 views

Panel is removing my form tag

I've created a Panel showing a form declared in a module within a block, but when I save it and view it, it removes the <form> tag and does nothing. Any help why this could be happening? My ...
0
votes
0answers
11 views

Temp images still aren't being saved in custom module form

I have what appears to be an expected issue with Drupal 7 in my custom module. My temp images are removed every few hours when the system_cron() function runs. I am, however, using a form submit ...
0
votes
1answer
19 views

How do you add information text to a Drupal 7 form?

I have this: $form['rate_the_room']['room_rating'] = array( '#type' => 'radios', '#title' => 'How would you rate the room you stayed in?', '#options' => array(1 => 1, 2 => 2, 3 ...
0
votes
2answers
24 views

Multi step form with click and state logging in Drupal 7?

I need to create two separate forms flows. Essentially the one case has 3 pages (intro, questions, thank you), while the other has 4 pages (intro, questions, questions, thank you). I want to be able ...
0
votes
0answers
18 views

#limit_validation_errors submit problem

I have a problem using #limit_validation_errors for a submit button on which I dont want all the validations to run. Here's my custom submit button : $form['actions']['draft'] = array( '#type' ...
0
votes
0answers
10 views

split result into two fields from autopopulated module in D7

I have a form with 2 fields I have created a module which pre-populates field1 based on what is keyed and what is found in the db. The SQL query is getting 2 columns from the db and I would like the ...
0
votes
0answers
10 views

Ajax form doesn't work when I moved '#ajax' block to submit button

I started to study the example from this page: https://www.drupal.org/node/752056 It works. But when I moved the '#ajax' block into $form['submit'], $form_state['values']['howmany_select'] is always ...
0
votes
1answer
34 views

Submit few forms in Drupal 7

I try to add Poll-voting to my website, on page I addet 5 votings forms, I try to make submission of all 5 forms by one click instead of 5 clicking. I wrote this script : <script ...
2
votes
1answer
28 views

Alter html output of a term reference form field

On my node edit form a term reference field is rendered with the following html output: <div class="form-item form-type-radio form-item-field-trainingstype-und"> <input type="radio" ...
0
votes
1answer
17 views

hook_form_alter Save $form['account']['field_first_name'] into $form['profile']['field_first_name']

Hi I'm trying to save a field into another field in the same form when the form is submitted. I've tried using hook_form_alter and checked for count($form_state['input']) > 0 to save ...
0
votes
0answers
30 views

How to use theme functions in .module files?

I am trying to override theme_radio and theme_radios directly in MY_MODULE.module file. For this purpose I declared these functions: 1) /** * Implements hook_theme(). */ function ...
0
votes
1answer
11 views

Form API Submit Button for Multiple Forms

I created a module with 3 forms on it. Is there a way to only have one submit button at the very bottom of the page that will store all three values?
0
votes
0answers
28 views

Ajax error when uploading image

I have a problem on my Drupal website since 2 days. When I try to add a new image (50 KB), the thumbnail is not displayed after transferring the image so I have to save the element and open it again ...
0
votes
0answers
9 views

when i onclick radio button then it's value should display in textfield [duplicate]

here i have two radio buttons radio button "One" and radio button "Two", when i click/check on radio button "One" then then it's value should display in textfield of "Display". ...
0
votes
1answer
39 views

when i onclick radio button then it's value should display in textfield

above is the sample screenshot of my form where i would like to do is: when i click/check on radio button "One" then then it's value should display in textfield of "Display". Code: function ...
0
votes
1answer
15 views

Append a Drupal form table

For the past few days I have been trying to update a rather simple table with ajax. The table cannot be rebuilt. This is of my own accord, if the table is rebuilt all of the colors data that was ...
0
votes
1answer
11 views

Set the value of a hidden field in form block

Using the code below in a block, I am displaying a form in a block on all pages for a content type called Goals. I want to use this block / form to update progress on the goal to a content type called ...
0
votes
0answers
17 views

drupal 7 on submission of form respective form should open

in my form i have to show two radio button and one submit button,please see below my front form is like this: candidate(radio) organization(radio) submit button. my requirement is that if user ...
0
votes
2answers
14 views

on submission of form respective form should open

in my form i have to show two radio button and one submit button, for example candidate(radio) organization(radio) submit button. my requirement is that if user click/check on candidate and ...
0
votes
0answers
13 views

on submission of form respective form should open [duplicate]

in my form i have to show two radio button and one submit button, for example candidate(radio) organization(radio) submit button. my requirement is that if user click/check on candidate and ...
0
votes
0answers
10 views

How to add token replacement for help text for a multi-value field

The entity reference form field help text does not do token replacement and I will have to call token_replace on it manually. I can do it in a form_alter by cycling through the fields. But ideally I ...
0
votes
2answers
48 views

Add cropping option to an image form

I've the next form. $form['imagen'] = array( '#title' => t('Image'), '#type' => 'managed_file', '#upload_validators' => array('file_validate_extensions' => ...
0
votes
0answers
15 views

Error uploading file. An unrecoverable error occurred

I've been troubleshooting a form in Drupal 7 that has two file upload fields. If you upload a file with one field, then the other, the second upload will usually give an error. This occurs regardless ...
0
votes
0answers
20 views

Drupal custom form with AJAX and javascript event

I have a custom form that is displayed in a custom block. That block is a popup div. When a user fills the form successfully it's displaying success message. I want to attach a jQuery that will ...
-1
votes
1answer
13 views

How to restrict access to page by URL depending on which page you came from

I have page which implements by hook_menu and i want to permit access for this page if user come from certain form but not from just url string. How can i solve it? Thanks.
0
votes
0answers
9 views

Changing label in custom search form

I have created a custom search form and am using it within a block. I have selected a content type under the Content Selector area called Basic Content. I want to change that label to read Foo but not ...
1
vote
2answers
31 views

Redirect to a specific page when user update their profile

Is there any way to redirect the user after save their profile information. I would like to redirect them to a specific page. To be clear, here is the Flow: User go in his profile He change his ...
0
votes
0answers
12 views

Alter fields added with field_attach_form()

I'm adding fields from a content type to a custom edit form using field_attach_form() and passing the field name to the $options parameter to get the fields I want. How do I alter the parameters of ...
1
vote
1answer
22 views

How to know the “name” of an input field of a commerce checkout form?

I need to find the name of an input field of a commerce checkout form to use in: form_set_error('NAME-HERE', t('Field cannot be left blank')); The html of the field is: <div ...
0
votes
1answer
16 views

Removing file from form breaks site

I created a module that hooks into the admin menu and allows you to upload a specific file for the site to use. It allows you to upload a file, and change a file, but as soon as you remove a file and ...
0
votes
0answers
12 views

custom entity admin page integrity constraints violation of managed_file in 'remove' process

I am developing a custom entity administrative page. The custom entity makes use of managed files. This is by storing a foreign key of file_id that references the file id in "file_managed" table. ...
0
votes
1answer
8 views

using hook_form_alter on a same form from 2 different modules

How will a predefined form behave if we have two different forms that implement hook_form_alter? I would explain my question by an example, because currently I got a crash on it: I have a predefined ...
1
vote
2answers
31 views

Update Two select box when change another select box

I have drupal form with three select box i want to change select box 2nd and 3rd after change value of 1st select box. ex: i have Three select box 1) Cruise line 2) Destination 3) Ship Id When ...
0
votes
2answers
24 views

How do I put registration form in panel in Drupal 7

I would like to know how to put a registration form or any other form to make a new content type in panels. I know the first thing to do is to put the registration form in a block. How can I do that?
0
votes
0answers
26 views

Adding form elements with jquery to a drupal form

I have a recipe form under node. Up until now, I had a button that would add another ingredient textfield by updating that section of the form with an ajax call. I can no longer do this. Now I have ...
0
votes
1answer
32 views

Different user form for registration and edit

I'm trying to make different forms layout for user registration and user edit account: - User Registration: Display it paginated, like a wizard. - User edit: Display it in only one page. I can use ...
1
vote
0answers
106 views

What properties does a custom cck_phone form field need to work?

I am struggling to get a working custom implementation of a cck_phone field from the cck_phone module. I have included my partially working code at the bottom. What seems to be not working is that ...
-1
votes
1answer
29 views

get checkbox values from a form

I have a form with dynamic values in it. $resolved = array( '#id' => 'resolved', '#type' => 'checkbox', '#return_value' => $result2[$i]['id'], '#attributes' => array('name' => ...
0
votes
1answer
36 views

form built by ajax commands not sending values

My problem is to do with ajax commands and the form being rebuilt after calling ajax_command_append(). I have a form with two elements an option and a textfield. These are built-in with the form on ...
0
votes
2answers
29 views

Save and Retrieve Admin Settings from the database

I created a config form in the admin/config page. (Just a link field that needs to be saved for later retrieval) Im confused as to how to save and retrieve the form data. When creating a custom form ...
0
votes
1answer
18 views

Form has no <form> tags

My form is outputting but has no form tags and is therefore not submitting. I have tried the following:- In the module... 'page callback' => "drupal_get_form", function pd_cd_form(){... From ...
-1
votes
0answers
8 views

Form layout / output

My form is not outputting in the correct order. I am building the form from a recordset and can alter the sql query so that it alters the form output, however the form output does not represent the ...
0
votes
0answers
37 views

Clear managed_file field on submit

I'd like to clear the managed file field each time the contents are sent off for further processing on submit. The callbacks work fine, but I have repeatedly come unstuck in my goal of having a ...
0
votes
1answer
22 views

Adding a webform to a different content type

I have an "event" content type. Now I want to add a Webform to it so that people can request purchasing and availability information. I checked my event content type in admin/config/content/webform ...
1
vote
0answers
22 views

Drag and drop between two lists

When the user creates a blog entry, I want the user to be able to make some selection from a listbox. Therefore I want it to be a function where I drag and drop between one prefilled listbox (where ...
0
votes
1answer
22 views

Form generated from form cache displays, but missing name and value attributes

I'm having a problem displaying a cached multi-step form in a custom module which generates custom entities. After two steps, the form posts to an external URL (action changed with ...
0
votes
1answer
41 views

Adding a form to the admin menu

Ive followed 3 tutorials and I cant seem to crack this. My goal is to create a form in the admin section to store some information. I have used the following to create the form and call it from a url ...