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

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Drupal posts the entire form and uploads all images when an Ajax request is made

I have added a button to "Add More" filed in one of my custom Drupal form using AJAX. This is a "Submit button" which ajax enabled and has a seperate submit handler and ajax callback. Inside the ...
0
votes
0answers
10 views

How do I build a form to filter nodes (like exposed filters in views)

I am very familiar with using exposed filters in views but have finally decided it's time to write my own module as the exposed filters aren't offering exactly what I require. I have a list of ...
0
votes
0answers
9 views

Custom Add page

I need to create a custom 'Add' and 'Edit' pages for specific content type, with some entity reference drill down behaviours. I'm trying to override the add page like below with my form within it, ...
0
votes
0answers
22 views

How to dynamically remove field in custom form using AJAX

Based on the "Add-more button (with graceful degradation)" example available in Drupal examples module I have created a form that can add fields dynamically using AJAX, and now i want to add a ...
0
votes
0answers
2 views

VBO Pass Argument to Custom Action Function

I have a view that list entities. It has a VBO field on it for executing a few custom actions. I can get the actions working, but I need to add a field to the operations form on the view which lets ...
1
vote
1answer
10 views

Adding accept attribute to managed_file field to specify file types client-side

I've got a file field in a custom form like this: $form['image_upload'] = array( '#type' => 'managed_file', '#title' => t('Image upload'), '#description' => t('Upload png ...
4
votes
1answer
36 views

Remove filter formats help text

In D6 and D7, with a simple form_alter you could unset $element['format'], but now the format help and the format tips are added in a #process method. How can I remove them?
0
votes
0answers
7 views

How to create an edit form for admin input

I would like to create from a module an add/edit form. For now I made an add form that looks like this: $form["locationTitle"] = array( '#type' => 'textfield', '#title' => t("Vietas ...
0
votes
0answers
16 views

Title not showing up on Form

I have the following code and for some reason my title is not showing up on the form display. I've tried flushing the caches a million times, clearing my cookie cache, and refreshing the browser and ...
0
votes
4answers
49 views

Where do I put and How do I use form_state['redirect']

The documentation says to put $form_state['redirect'] in your code when you want to send the form to a new page. However, when I use it in the third page submit handler of my multi-page form it ...
0
votes
2answers
34 views

My php is showing a numeric value for my list field…Why?

In a form I'm trying to take a value a user selected from a radio button and compare it with what's in the database. The value for the radio button is stored in $form_state['storage']['level']. The ...
0
votes
0answers
11 views

Create a registration form

I've already customized the default user_register form with hook_form_register_form_alter(). That form is using complex multistep form and connects with a web service for validating etc. Right now I ...
0
votes
0answers
25 views

Fatal error: Cannot use string offset as an array [on hold]

I'm trying to delete or hide the delete button on all my field collection for specifics roles but i got the error : Fatal error: Cannot use string offset as an array in ...
0
votes
1answer
19 views

how to make URL aliases of nodes created via form include node title of original page?

Say I have a content type called "X", and every node of Content type "X" has a form that will create content type "Y" How do I go about setting up the URL alias of content type "Y" so it will be ...
0
votes
1answer
19 views

How can i create a new page template for user registration page

I am a beginner in Drupal. I need to create a new page template for registration Page . Because in my website almost all pages have different layout. Currently all pages are rendering through ...
0
votes
0answers
12 views

How to get submitted form value inside hook_preprocess_hook() in Drupal 7?

I have a management module which consist of two theme pages[much like the core Search module], management-block-form.tpl.php: for showing the form and management-table.tpl.php: for showing the ...
0
votes
0answers
7 views

Adding a styled progress bar under Form Title but above #prefix text in Custom Module

I have a multi page form. This form has a title set in the hook menu function at the top as they are wont to do. It displays the title of the form, with this code: 'title' => 'The Tool', I then ...
0
votes
0answers
11 views

Can't replace page content on node from ctools modal

I have a custom field formatter on an Event node that displays data from a multifield in a simple HTML table (the multifield has a user entity reference field and a text field that contains a number ...
-1
votes
0answers
10 views

Apparent incompatibility of modules for email [closed]

I have installed printmail. Problem with sending email as it is dedicated server. By suggestion of a Drupal expert, I install phpmailer module. It works perfect. But now I want to embed the images in ...
0
votes
0answers
10 views

How to attach an event to manually added form fields

I am using Ajax to change the values of some selects, I actually do replace the old select with the new one, but unfortunately the on change event is no more available, even if I manually added the ...
1
vote
1answer
11 views

Form inputs being disabed during the Ajax request

I'm working on a module where I have a form inside of a block, I'm using Ajax to submit the form, but I noticed that the form's inputs are disabled when sending a request with Ajax. Well in my case I ...
0
votes
1answer
13 views

Combine Token title with url in an email

I send emails automatically to users. There is a link in these mails, which points to a node. But I want to use the node title as an alias for this link, so that the link is not directly displayed in ...
0
votes
1answer
9 views

Form Permissions not working in Module with Multiple Forms

This works great in a module with a single form, however in a module with multiple forms the form does not show up in the permissions list. Is there something that I need to do differently for modules ...
0
votes
0answers
31 views

why is my autocomplete not working?

i'm working with groups and users, and i would like to display only the users that are not already in a group to prevent errors while writing the name of the user. Here is the menu : ...
0
votes
1answer
47 views

Displaying Database Data Within the Flow the Site

I have a multi-page form that works fine in and of itself (pathfindertool.module). However, once a user clicks submit I want the page to display some records on the page. And it DOES display the ...
0
votes
1answer
26 views

Can we add a new column to field collection in edit form?

I created a topic before with this question, but i write another to be more exact on what i want to do. I have an entity with several field collections and in this field collections, several fields ...
0
votes
0answers
47 views

Dependent multiple selection drop down in drupal form - illegal choice error

I'm new to Drupal , in my project I have 2 multiple select drop down box. I don't know how to do dependent multi select drop down action in drupal form alter function using ajax. Single selection ...
1
vote
2answers
27 views

Call a function in JS file from drupal

I have included a javascript in the module "myid" I've been developing in drupal by using this code: function myid_init() { drupal_add_js(drupal_get_path("module", "myid") . "js/myid.js"); } ...
0
votes
2answers
9 views

Expose the user form into a page

I've been thinking for a user-friendly navigation into my website. I wanted to exposed the user form into a page where they can just easily update their information. I've installed the module profile ...
0
votes
1answer
11 views

Create and pre-populate a mutiple value field in field collection on new node with ajax call

This question is in the same area as a previous I asked (How to create (& pre-populate) multiple “field collection” fields on an ajax call), but with the extra level of complexity that I'm trying ...
0
votes
1answer
18 views

How to update the page breadcrumb when using theme page

I have an entity form(theme page to display it) . I have used hook_node_view() to handle breadcrumbs for nodes. But I don't find any place to handle this $breadcrumb when I have a form and a theme ...
0
votes
0answers
20 views

get list of css files of default theme from backend

is it possible to get a list of css files which will be using on default theme from backend. suppose, my default theme is 'Bartik' and theme-settings.php file have a function to view a list of css ...
0
votes
1answer
29 views

Drupal Form Button + “Are you sure”-Button

I am trying to add an own JS function to a Drupal Core Form - think Config, Development, Clean Cache. This function basically just asks if the user is sure. Here is what I have so far: ...
0
votes
0answers
34 views

Mathematics and Drupal

I spent the last couple of days searching about my project on google. Reading on blogs and drupal answers. I haven't concluded to a result. What I want to do: Have a submission form which can be ...
0
votes
0answers
15 views

Need to load form manually after autocomplete field value selected

I'm fairly new to Drupal and have spent most of my time in the form API. The one thing that is perplexing me is how to load the field values of a form after a value has been selected in my auto ...
2
votes
2answers
64 views

How to create (& pre-populate) multiple “field collection” fields on an ajax call

This is an extension of this question - "How to pre-populate multiple "field collection" fields in node form" I'm trying to do the same thing, but I'm trying to get it to work on an ajax ...
0
votes
0answers
31 views

Drupal 7 3 level ajax dependent dropdown form

I've looked at other solutions here but I'm just not getting this... I've banged my head on this for too long.. it probably needs another set of eyes. When the form first appears (as it is here) the ...
0
votes
1answer
12 views

How to Rebuild Registry On Admin Form Submit

I would like to initiate theme registry rebuild(drupal_theme_rebuild) on a particular form submit. This is admin form for my custom settings: function HOOK_menu(){ $items['admin/some-url'] = array( ...
1
vote
0answers
15 views

how to get form_state in Modal (ctools)

I Want to get the comment form_state in the ctools modal to change a variable i was trying to use drupal_get_form but i cannot access to form_state ? Before submitting the comment form i want to show ...
0
votes
1answer
20 views

open a modal just before submit to get an answer yes or no and then submit

I'm altering a comment form and on my page i want to show a modal to ask the user for an answer then i will submit. I tried to drupal_get_form on a ctools modal but a lot of problem on submit it will ...
0
votes
0answers
12 views

Drupal 7 make edit form to stay on the form itself after submitting the form

In Drupal 7 profile2 module, want to make profile2 edit form to stay on the form itself after clicking SAVE button. With the following code, it stays on the form itself and displays the values ...
2
votes
1answer
47 views

jQuery events are lost after form reload

First I thought that this would not be a Drupal specific problem, but jQuery specific solutions didn't solved it. I hope you have some advices. I have a form with lots of fieldsets. To find the right ...
0
votes
1answer
28 views

Obtain an image url

I've a module that in the .install creates a table. In that table I have to save the information of one image, that's imagen_leyenda. I obtain that image from a form, that I have created in my ...
0
votes
0answers
16 views

Update Textfield outside of form on ajax callback

I have a page contains two forms, I want the fields in the second fomulaire either change when ajax callback launches the first form. How to update Textfield outside of the form on ajax callback ? ...
2
votes
0answers
48 views

Form with AJAX callback inside an AJAX callback doesn't work

I hope the question doesn't sound strange. In a nutshell: I have a Drupal form, but I am adding it to the page as the result of an AJAX callback. I need this form to trigger a new callback. My code ...
0
votes
1answer
11 views

How to validate an AJAX form which uses CTools?

I have a form which opens in a modal CTools window. The forms submits perfectly, but when I try to use the my_form_validate() function, it never goes to that function, it always go directly to ...
1
vote
1answer
45 views

How to style a programmatically created page with a template?

I'm struggling with understanding theming pages with templates. I'm stuck with creating a new template for a programmatically created page. I have a module that shows a download page for a file. The ...
1
vote
1answer
53 views

Form submit with radio in table has data in form_state['input'] and not in form_state['values']

While developing a form for Drupal 7, I need a few radio groups, placed inside a table (one radio group per table row). The radios are defined as '#type' => 'radio' (not radios) and grouped ...
6
votes
1answer
55 views

How to use #element_validate and #value_callback in Drupal 8

I have followed the official Form API Documentation, but this code don't work for me on Drupal 8: public function buildForm(array $form, FormStateInterface $form_state) { $form['upload'] = ...
1
vote
0answers
12 views

Commerce multi-select membership donation form

Something like this using Drupal Commerce? You select from a select list multiple options of which everyone has a price right? And so it adds it as a total below in a field like a cart, but in a same ...