Questions tagged [drupal-fapi]

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

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

Documentation about the form API can be found on:

Related documentation

196 questions
0
votes
1 answer

How do I update more than one container/element using AHAH in Drupal?

I'm creating a summary view of products and prices, along with the ability to update the prices for each product (each product has 5 prices for various user roles). I'm using AHAH to submit the specific product form, and have the form working great,…
HorusKol
  • 8,375
  • 10
  • 51
  • 92
0
votes
1 answer

drupal adding a user reference field to a template

I have a template file that I want to print a the cck user reference form field on. Is this possible? Note, this is not the field value, but the field form. Also asking for just the field, not creating a form first and then using…
Mark
  • 32,293
  • 33
  • 107
  • 137
0
votes
1 answer

In drupal, how we generate
tage with fapi

am using drupal, I made a form wiht drupal fapi moduele_menu() module_myform() module_myform_submit .. I get in my page the form elements ( inputs...) but i did not get the wrapper ( !!!! Can someone help please
Mamadou
  • 2,177
  • 5
  • 31
  • 43
0
votes
2 answers

Using .ai (adobe illustrator) variables with Drupal variables

As we know that we can assign the variables to Adobe illustrator file. Is it possible to access these variables by using Drupal 7 variables feature?
insomiac
  • 5,648
  • 8
  • 45
  • 73
0
votes
1 answer

Drupal 6 custom submit function to alter submitted node data

I have written a module that uses hook_form_alter to add a custom submit function to the node form. This function is not intended to remove the original node submit function, it is there simply to alter node data before it is inserted into the…
Jamie Hollern
  • 154
  • 3
  • 15
0
votes
2 answers

Form elements as arrays in Drupal

Using Drupal 6.20. We can setup some form elements like this:- and then cycle through them in PHP with foreach ($somename as $name) { ... } I am trying to do the same in Drupal.…
mkjeldsen
  • 2,053
  • 3
  • 23
  • 28
0
votes
1 answer

drupal_get_form : Manual call to render a form isn't working

Menu Callback function content_form_select($id, $sid){ $type = check_content_type($sid); if($type == 'video') // Render content edit form return drupal_get_form('content_video_form', $id, $sid); else if($type ==…
Shoaib Nawaz
  • 2,302
  • 4
  • 29
  • 38
0
votes
1 answer

Drupal temporary wizard form

I am creating a wizard form to order items, I have 4 content types, project | door | dooroptions | projectoptions. This is done in 4 steps: You give tour measurements, the doors that fit are show, you pick a door, you pick the options for the door.…
Nealv
  • 6,856
  • 8
  • 58
  • 89
0
votes
1 answer

Drupal: Render form including results, but don't duplicate resultset query

Aim is to display a form, with a default resultset on the page, and allow the viewer to filter the results on the page by form submission. This part works. However: If a default set of results is included, then the initial submission builds two…
Chris Burgess
  • 3,551
  • 3
  • 29
  • 42
0
votes
1 answer

Problem with drupal_execute for user_register and password field

I am currently using the Drupal function drupal_execute to register users, however the password value seems to only record the first chracter when it saves in the DB. $form_state = array(); $form_state['values'] = array( 'name' =>…
lordg
  • 520
  • 5
  • 25
0
votes
2 answers

Including results along with a form on the same page and theming the results using drupal

I have successfully created a page in drupal that displays a form and results on the same page. The form acts like a filter of the results. The results include a bunch of html that includes google charts via the Chart API module…
Korey
  • 1
  • 1
0
votes
1 answer

Drupal creating a select box and populating it with user reference

I am creating a custom form in Drupal. In this form I wish to create a select box. In this box I wish to list all users on the site. When saving my form this will populate a CCK field which references users. I know to create the select list I use…
Sally
  • 1,749
  • 7
  • 31
  • 39
0
votes
1 answer

Drupal form in tabular layout

I am trying to render a tabular layout (html table) for a form such that first cell contains a checkbox. $form = array(); $res = query('SELECT * FROM {mytable}'); $rows = array(); while($row = db_fetch_array($res)){ $record = array(); …
Shoaib Nawaz
  • 2,302
  • 4
  • 29
  • 38
0
votes
1 answer

Make changes to main form with ahah callback in Drupal?

I have a form like poll form.When there is no data in db I want to show only add button and when user clicks "more" I want to show him/her a submit button. I used the following code but it seems doesn't works. if ($form['count']['#value'] > 0) { …
Nick.h
  • 4,035
  • 5
  • 21
  • 22
0
votes
1 answer

Is it possible to ajaxify drupal multistep forms?

It seems to be difficult to ajaxify a drupal multistep form(loading next step without page refresh).I googled it but I didn't find any solution. Does anybody know how to do it?
Nick.h
  • 4,035
  • 5
  • 21
  • 22