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

learn more… | top users | synonyms (1)

0
votes
0answers
1 views

Make a menu after clicking a button in Forms API

Hi I want to achieve something like this. When I click the button below: A menu will appear like the image below:
0
votes
1answer
7 views

Add a Canvas Form Control in Drupal Custom Module

Im currently developing a module and I have this code in html: <canvas id="cnv" name="cnv" width="500" height="100"></canvas> I want it to add in my page using form controls but when I ...
0
votes
0answers
12 views

Having trouble selecting elements in jQuery with JS added on the form

I have a form with a file element and a button. When I click the button it is supposed to run some JS. I have tried three separate ways to get this to work but each way gives me a different result. ...
0
votes
1answer
18 views

Changing color of form html with Javascript

I have some custom HTML and CSS added to a form module I've created. It looks fine; the css is styling it correctly with a drupal_add_css() stylesheet. But I also want to add some Javascript using ...
0
votes
1answer
13 views

confirm_form redirect to referrer

I have few confirm_forms which could be invoked from different places. I would like to redirect user to proper place after cancelation. REFERER Header is not good way to do it so I'm looking for good ...
0
votes
2answers
26 views

Impossible to get my pager

I need to show in the same page a form and a table which shows all results from a webservice response. function collectivite_search_user_form($form, &$form_state) { $form['name'] = array( ...
1
vote
0answers
23 views

Ajax form works on page but not on block

I've created an ajax form with drupal API. The ajax functionality works if I render the form on a page with hook_menu, but it doesn't when I render it in a block. This is how I create my block: ...
0
votes
0answers
11 views

Module to have people enter text in an on-page “pop-up” box when clicked on a <span>…</span> (already having a JS function) — and save their input

I am looking for a module that allows certain users to enter text when clicked on the text-contents of a <span>...</span>. In my case the <span>'s automatically start an audio file ...
0
votes
0answers
13 views

Custom register form and default register form

I have a custom module that alters the default form. It's a multistep form, lot more other details, web service xml posting and getting details etc. The thing is here, now I'm using the Services+REST ...
0
votes
0answers
12 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
12 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
24 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
6 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
11 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 ...
5
votes
1answer
61 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
53 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
35 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
13 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
1answer
22 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
21 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
13 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
8 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
14 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 ...
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
12 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
14 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
50 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
27 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
57 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
12 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
21 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
30 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
19 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
70 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
37 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
14 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
24 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
53 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 ? ...