The form API is a very strong, robust, easy and scalable API for creating forms in Drupal.

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

D7 FAPI unexpected bahviour when combining AJAX, checkbox and a table theme

I have a table filled with checkboxes in a form made according to: http://passingcuriosity.com/2011/drupal-7-forms-tables/ The form also has a autocomplete textfield with an ajax button, which allows ...
0
votes
1answer
16 views

Can't get form_state['values'] from a form on a custom checkout pane

I created a custom checkout pane with Drupal Commerce so if a user checkouts as anonymous they can create an account on the checkout completion page. The problem is that when in my form's submit ...
0
votes
0answers
3 views

how to make profile fields based on conditional role selection before account creation

I'm using Drupal 7.23, autorole module and Profile2 to expand the user profile based on role. In my setup, each role has a different set of fields available to them after they sign up. What I'd like ...
3
votes
2answers
34 views

How to actually set a maxlength for textarea field in contact form

I need to limit the textarea message of the core module contact form to a certain number of characters. Here are the facts The Form API does not allow to set a maxlength on textarea field types ...
2
votes
0answers
28 views

Pulling user details from the account pages as admin

I should have written this clearer the first time. I can pull the information from the account page using $admin_email = $edit['mail']; However this code will not also grab the info that is on the ...
0
votes
0answers
21 views

views ajax form alter

I have some slightly complicated ajax form logic that I'm struggling with. I would like to replicate the following form conditions. radio1 - always visible option1 option2 option3 radio2 - only ...
0
votes
1answer
15 views

states multiple triggers

I have looked at previous posts but can't seem to get the following to work. It just displays the form line all the time, I can get it to work when checking for just a single option. $form['type'] = ...
0
votes
1answer
32 views

Programmatically save file into profile2 entity

I'm trying to save a file into my Profile2 entity, I've taken the user through a multi-step form, I've saved all the data and at the point I want to input my data into my profile object, I have a ...
0
votes
0answers
22 views

Add Custom validation with Clientside validation

Can anyone show me an example for adding custom clientside validation in drupal? I need to add my custom validation work with client side validation. I want to make it work my custom validation with ...
0
votes
0answers
17 views

Programatically create field collection into Profile2 on new user creation

I've set up my own custom multi-step registration form, because I just couldn't find a way of making anything out there do what I want. I've found other questions on here like this one and this one ...
0
votes
1answer
15 views

Print the query results inside the submit function

I have a query wherein it fetches data from the database, a simple SELECT query which is processed when a certain submit button is clicked. What I want to achieve is to get the results of that query ...
-1
votes
0answers
21 views

using form ajax callback in nojs mode

I use of ajax function in my form and it's work good but my form don't work on js mode I know that I can use menu callback, call a function and pass type to it for no js mode (type == 'ajax') but I ...
0
votes
1answer
31 views

How to avoid clearing of the form state?

I want to add form field based on data provided in submit handler. I am using $form_state for the job. I have done similar in the past but now it's just not work Form code: function ...
-1
votes
0answers
13 views

file/managed_file form element over ajax

I have a form and on user request, i add few form elements over ajax. Among this elements, there is also a "managed_file" type of element, which is not working properly? if it is created at first call ...
2
votes
1answer
17 views

Creating a custom url when navigating to a custom module form

I have created a custom module which can be visited via the address http://myhost.me/my_module/form where it will show my created form. Is there a way wherein instead of using ...

15 30 50 per page