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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Embedding an entity refenrence add button on a q=node/view page

I am creating a 'Activity Management' site for that I have created Activity and Participant content types. Participant content type has Full Name, Cell No, Email, Address fields and 'Activity' has ...
0
votes
1answer
21 views

Load Javascript when a particular form is loaded

I have the code below in my own drupal module(myid): myid.module file: function myid_init() { drupal_add_js(drupal_get_path("module", "myid") . "/js/myid.js"); } function myid_menu() { ...
0
votes
0answers
9 views

Is it possible to append Media's file browser to a certain node type?

I have a certain node type with a canvas on it, allowing users to draw on the node. Basic functionality such as lines are working, but I'd like to allow people to upload images to it as well. Since ...
0
votes
0answers
19 views

Using form api to store google map location

Is it possible to use form api (write codes) to display and store google map Latitude and Longitude? Most of the modules available is to add new google map field to drupal content type. I don't want ...
0
votes
0answers
26 views

Render a drupal_get_form() don't execute ajax select callback

I want to re-use the commerce_customer_profile form in a particular context. To do this I use this : function MY_MODULE_form($form, &$form_state, $profile_type) { $form = array(); global ...
0
votes
0answers
6 views

User account with editable forms

With a bunch of volunteers we organize once or twice a year a camp for children who there parents doesn't have the money to go on vacation. To run the signing in for the event more smooth i had the ...
0
votes
0answers
18 views

Question about adding a field value to a view programmatically

I am having a problem getting a field to print and know it is something I am missing. I am trying to print a product field in a view that is created programmatically. Everything else is working fine, ...
0
votes
2answers
25 views

Why drupal gives me error messege -“Unable to send e-mail. Contact the site administrator if the problem persists.”

In my project we are sending promotion email to profile2 users after registration using Rules. Everything is working fine. We receive both email of registration link and promotion email. But drupal ...
0
votes
0answers
10 views

Ctools content type with ajax enabled form

I am trying to accomplish the following: I have a ctools content type that renders a table (theme_table). The contents of the content type plugin consist of a variety of database records about ...
0
votes
0answers
12 views

ajax callback add more on a select field

I am trying to implement a "add x" on a select field but it doesn't seem to work. I've tried to follow this example but they use a submit for that. $form['myfield'] = array( '#type' => ...
0
votes
0answers
15 views

Entities, Views and frontend creation/edit - a concept question

I'm a casual Drupal-Developer and stumbled upon this problem several times: You have any kind of entity, lets say a node, and want the user to fill in field values with a form in the frontend. I.e. ...
0
votes
0answers
17 views

Get markup element value in drupal 7

I have canvas element in my form. I want to save canvas.toDataURL into a drupal variable (myid_registrar_signature) after the submit button is click. How will I do that in Drupal 7? function ...
0
votes
1answer
24 views

OnClick Event not Captured

I was currently developing a module(myid) in Drupal. I made a button(#myid_registrar_button) that must alert whenever it is clicked. Below is my code: myid.module file: <?php function ...
-1
votes
2answers
18 views

Autocomplete text field with add more custom module [closed]

I am trying to create one custom drupal form which contains ... auto complete text field add more dynamic above text filed Its working as have used drupal ajax and FAPI. But when I am adding ...
0
votes
0answers
10 views

drupal_get_form in hook_form for a custom node type causes error

I added a custom node type using hook_node_infom call it /** * Implements hook_node_info(). */ function example_node_info() { return array( 'example' => array( 'name' => ...
0
votes
0answers
23 views

How to trigger ajax Form API action by js

In a custom form you can add an #ajax property, e.g. $form['some_element'] = [ '#type' => 'textfield', '#title' => 'Foo', '#ajax' => [ 'callback' => 'foo_callback', ...
0
votes
0answers
10 views

Form action=“/cron.php”

I got a custom form in a block, wich is available on my homepage. After e while the form action changes to action="/cron.php" instead of action="/nl". I can't figure out where this fault is comming ...
0
votes
1answer
15 views

Inline js inside a form

I'm trying to attach inline js inside a form, but it's not working out. Is there anything wrong with below code $form['#attached']['js'][] = array( 'data' => 'jQuery(function() { ...
0
votes
0answers
10 views

Display query results in my Form Control

I want to display query results in my Form Control. Below is my code: 1. function myid_user_page_form(){ 2. $enrollment = array( 3. 'database' => 'enrollment', 4. ...
0
votes
1answer
21 views

Join a select form with the number of the database to check

I have this select form: $options = array( '20' => '20', '100' => '100', '500' => '500', '1000' => '1000', '5000' => '5000', '10000' => ...
0
votes
2answers
20 views

Unset required attribute with multiple submit buttons and multistep form

I have a multistep form created with msnf for an content type. I set multiple submit buttons that each one has its own submit callback, and also i want every single button with its validation callback ...
0
votes
1answer
18 views

Expose the required fields in listing view

I have created a content type say "Form" which have one of a field named as "gender" set as a radio buttons. This radio button I want to expose or make it visible with its functionality when I am ...
0
votes
0answers
3 views

Drupal Contact Form Emails Going To Some Emails But Not To Email Containing Domain Name

I know this has been talked about in other submissions, but I have not actually seen a solution to this. I have my Drupal email contact form that sends to multiple email addresses. All of the ...
1
vote
1answer
27 views

Trying to change a radio value during form validate

I have a form that includes a set of radio inputs, and other fields that will or will not be relevant, depending on which radio option is selected. I'm using #states for client-side UX sugar. However ...
0
votes
0answers
12 views

Custom HTML output of site wide contact form

I'll display site wide contact form in block, probably using some additional module because I didn't find any solution for that. Now, I need to have exact HTML output of entire form, here is the HTML ...
0
votes
0answers
16 views

Theme a form element in drupal with template file?

I wanted to ask you if its possible to do following things: My form consists of three elements. 2 Dropdowns and one custom element. The second dropdown values are getting rendered when I choose a ...
1
vote
0answers
25 views

Custom module data storage

In Drupal 6, I'm writing a custom module that generates several pages (as a Drupal newbie). Mainly public form pages for soliciting donations - users fill out their info (amount, frequency, etc.) and ...
0
votes
1answer
14 views

Want to process node edit in two different ways

On every node page there is an edit and submit, you can set when the edit is available and such. So, what I want to do is this. When a regular user uses the edit button(which I want to be available ...
-1
votes
0answers
16 views

Help a newbe with an approach with a confirming budget form [closed]

First of all, i don't know much about Drupal, but i was thinking I can use it for this task: After the financial department calculates our sales budget, our salesman has to either approve or change ...
0
votes
1answer
16 views

How to create add and edit pages for content types beside to Administration

In my drupal installation (Drupal 7) I have various users. What I want to do is, I want to enable somehow my users to be able to create content their own, without using the administration page. Lets ...
0
votes
1answer
18 views

This form was missing from the server cache on Drupal 8

On my site I do this: I got a form with this field: 'myfile' => [ '#title' => $this->t('MyTitle'), '#type' => 'managed_file', '#upload_location' => 'public://myfolder', ], And ...
0
votes
0answers
10 views

D7 - Form submit in TPL

So i understand this is completely out of bad practice but due to a 3 days timeline we had no choice. We have a form that is a TPL at the moment. Right now that data processes a payment, but now we ...
0
votes
0answers
17 views

List records in table and on click display details in form

I created a website which has two menus in it. One is to enter details of a person and the other to view list of entered persons. Here is the code function agents_menu(){ $items=array(); ...
0
votes
0answers
41 views

Change select list argument and rebuild on form state change

So, I'm trying to filter a select list by one of the other fields on a node. In this case, we will select a taxonomy term (you can only choose one) and then based on that rerender the select list of ...
0
votes
2answers
17 views

User email being deleted when submitting Profile 2 form

i'm debugging a site that I haven't made. The issue is that the users email address is being deleted. I've found which form it's happening on; and by using hook_form_FORM_ID_alter I can see that ...
0
votes
0answers
21 views

Allow non-programmers to build sites

Is there a way to allow a user who is not a developer to enter the text and slideshow images for a Lead Generator page without going through all of the Drupal screens? I need to allow our marketing ...
0
votes
0answers
32 views

Adding a list of strings or entities to another entity

I need to be able to add a list of departments to an entity directly via the add form of that entity. Those departments don't necessarily exist in the application beforehand and could be strings or ...
0
votes
1answer
32 views

Entity form calculator in Drupal

I was wandering, is there anything like webform calculator for entity forms? Thanks
0
votes
0answers
20 views

Custom menu with drupal_get_form plus form_alter_hook

I'm working in Drupal 6 to create a custom module. I have a menu that creates some custom URLs and tabs for me, and each item runs a page callback function, which itself runs drupal_get_form. What ...
0
votes
1answer
17 views

Sending Auto-filled Email from Content Type Profiles

I have 'resource' content types. There are hundreds. I want each profile to contain an individualized link to a 'feedback form', or some mechanism to report an error with the profile, by email...to ...
0
votes
0answers
23 views

Drupal 7 node save gives intermittent token validation error

When submitting a content type node I'm occasionally seeing a form validation error regarding tokens being invalid. I've tried reducing the token tree depth too using Token Tweaks which helps on ...
1
vote
1answer
14 views

Ajax in a form produces an error

suppose this form: function test_ajax_form($form, &$form_state){ $form['school'] = array( '#type' => 'textfield', '#title' => t('School'), ...
0
votes
0answers
22 views

Ajax File upload breaks/repeats all custom javascript

I've created a multi-step entityform which includes a file upload field. Everytime file is uploaded the form navigation breaks. Nothing happens when clicking next or prev buttons and there's no ...
0
votes
1answer
48 views

How to query the database to create a report based on user input variables in a form?

I am creating an example report of user data based on selection criteria selected in a form. I can create the form variables, and I can redirect the user to the report output page, but how do I ...
0
votes
0answers
14 views

managed_file upload clearing $form_state

I am having an annoying problem whereby $form_state['values']['region'] and $form_state['values']['country'] are being cleared when I upload an image via the managed_file field. This is causing a ...
0
votes
2answers
59 views

How to populate the select option using select index

-- Modifying my previous question -- This really got me. This is what I am doing right now with my module. I created a menu_hook which creates a form using a theme to create data. Another menu link ...
0
votes
1answer
15 views

How to render Entityform submission (entity) without DOCTYPE and HEAD tags?

I need to render entity as a part of page instead of individual page. By this I mean I want to able to render it without DOCTYPE declaration and HEAD tags. Typically this could be done within ...
0
votes
1answer
29 views

Set default value for Enity Reference using View and Entity Reference View Widget Checkbox

Basically i have a field (in line item(commerce custom product)) with Field type: Entity Reference and Widget:View. The view is a list of terms and has an aditional field type:Entity Reference View ...
0
votes
2answers
26 views

How can I add custom markup with a theme function?

I have a simple form as follows function MY_MODULE_form($form, &$form_state) { $form['MY_MODULE']['message'] = array( '#type' => 'markup', '#markup' => 'My Heading', '#tree' ...
0
votes
0answers
16 views

Drupal menu calling variables in the template

When I use these functions it gives me a permanent redirect error on the code whereas when I use other page callback it does not give me any problems. function kbc_menu() { $items['hello3'] ...