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
2 answers

Validation on user registration form?

i have made module in which i am trying to add validation like if the user had entered the characters in "Phone No" text filed and same on "Mobile No". This will run when user had open the user registration form. I have made this....
Nitz
  • 1,690
  • 11
  • 36
  • 56
0
votes
2 answers

Displaying Array in Select - FORM API Drupal

I want to add key(type_id) and value(type_description) to select in drupal form API $result_x->product_types->RPMProductType is array result from Database :- array(4) { [0]=> object(stdClass)#18 (2) { ["type_description"]=> string(10)…
Kris1511
  • 190
  • 3
  • 14
0
votes
1 answer

Customized User Registration Form

i have made user-register.tpl.php file. And i have set many text field in that. But now i need that.... i want to store the users information to the database. bcz i have created the customized registration page, so i need that my text field values…
Nitz
  • 1,690
  • 11
  • 36
  • 56
0
votes
2 answers

How can give validation on custom registration form in drupal?

I have created custom registration form in drupal 6. i have used changed the behavior of the drupal registration page by adding this code in themes. template file function earthen_theme($existing, $type, $theme, $path) { return array( // tell…
Nitz
  • 1,690
  • 11
  • 36
  • 56
0
votes
1 answer

Form values appear blank when submitting to the database - Drupal FormAPI

I have been working on this drupal form API script for past week and half. to give an insight into my problem.. the form below merely lists a host of database records which contain 5 individual scoring ranks. (mind, action, relationship, language…
user293838
0
votes
1 answer

Problems in user - registration module in DRUPAL

I have some problem in drupal registration page. I want to change whole user registration page. in registration module i want to add new field type. Bcz i want that user can choose the date from date-time picker. I have ready date-time picker which…
Nitz
  • 1,690
  • 11
  • 36
  • 56
0
votes
2 answers

img captions based on src value match

I am trying t o create img captions based on src value match. JQUERY : What is the best way to extract "Author-ABC" from an img with src value wwww.abcd.com/images/imagename__Author-ABC__.jpg and replace the alt value with this value. DRUPAL : Is…
Basho
  • 1
0
votes
1 answer

Drupal hook alter with hook validate

I have a CCK defined form called 'mytype_node_form'. I create a module called form_overrides I create a function called form_overrides_form_alter where I successfully check for $form_id = 'mytype_node_form' Question: What should be the name of my…
bert
  • 287
  • 6
  • 14
0
votes
2 answers

Drupal: collapse CCK Fields in edit content pages?

can I collapse the field in my edit-content page in Drupal ? For example, at the bottom of the page Revision Information, URL Path Settings, Authoring Information etc are collapsed. I would like to have this functionality for the CCK Fields as…
aneuryzm
  • 63,052
  • 100
  • 273
  • 488
0
votes
1 answer

need some tips on Drupal $form value

I got dpm($form) working. Nice! This is much better way to view data. I am still trying to figure out where stuff is coming from eg: location longitude & latitude. The word 'longitude' is referenced in 20 different places. I thought this was a…
bert
  • 287
  • 6
  • 14
0
votes
1 answer

drupal form override theme function

i created a module that generates a small form. I also made a function that should theme the form, overriding the standard theme. But form some reason it doesn't call the theme_ function. Am i forgetting something? function mailinglist_menu() { …
dazz
  • 8,162
  • 9
  • 31
  • 41
0
votes
1 answer

Drupal 7 Form API Theming #autocomplete textbox with long text

I have a textbox on a form that uses the #autocomplete property to provide a drop down list of options based on the text the user enters. This works great, except that some of the descriptions are very long, and don't fit in the width of the drop…
James Shields
  • 309
  • 4
  • 12
0
votes
2 answers

Drupal 6 Validation for Form Callback Function

I have a simple form with a select menu on the node display page. Is there an easy way to validate the form in my callback function? By validation I don't mean anything advanced, just to check that the values actually existed in the form array. For…
Wade
  • 59
  • 3
  • 8
0
votes
1 answer

Drupal 7, default_value for a file field in a custom form

I've created a formular where the user can upload an image using a file field. In another formular the user is able to change the image he previous uploaded. So far I was able that the user can upload a new picture or let the field empty and the…
Felix
  • 565
  • 1
  • 6
  • 17
0
votes
3 answers

Run JavaScript on form submit in Drupal 7

I have a form with a few fields the user should fill out. The form also have two hidden fields for the users current position (lat, long). I have spent quite some time now trying to find a way to fill these fields. How I want it to work is like…