fapi

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Andy Inman's picture

Caching AJAX results

A while ago I started working on an experimental module to cache the results of standard Drupal FAPI AJAX calls. An example use-case, you have form with a drop-down selector "country" and a second drop-down "city". The contents of the city selector are dependent on the selected country. So, when you change country, the list of relevant cities for that country gets loaded via AJAX. Now, that list is always the same (until a new city comes along or one gets renamed) so can feasibly be cached.

Read more
texas-bronius's picture

Drupal 6 Form API - setting #size doesn't seem to set for me?

For some reason my module's form's textfield is not obeying the size => 4 I'm asking it to be. Am I overlooking something (again)?
In addition to the whole code below, see the attached screenshot...
<?php
function project_calc_concrete_calculator() {
$form['instructions'] = array(
'#prefix' => '

',
'#value' => t('Enter concrete slab dimensions'),
'#suffix' => '

Read more
texas-bronius's picture

Drupal 6 Form API - setting #size doesn't seem to set for me?

For some reason my module's form's textfield is not obeying the size => 4 I'm asking it to be. Am I overlooking something (again)?
In addition to the whole code below, see the attached screenshot...
<?php
function project_calc_concrete_calculator() {
$form['instructions'] = array(
'#prefix' => '

',
'#value' => t('Enter concrete slab dimensions'),
'#suffix' => '

Read more
mlncn's picture

AJAX Form Messages, an API to provide an enhanced user interface for forms– catching errors before the submit button is hit

This module will provide an API and a UI for immediate inline validation or other checking and responding of form elements. (Contrast this with AJAX module, which validates the entire form via AJAX when the submit or preview button is pressed.)

The ideal will be to automate using (or make it very simple to use) existing form element validation functions as the back-end of inline validators.

The initial motivation was to extend (and make an honest module out of) Unique Fields AJAX checking, but the number of nice-to-haves and ought-to-bes make point the way to a new API for setting message conditions and messages. This will be developed API-first.

Notes from my due diligence are here: http://data.agaric.com/raw/ajax-form-messages-proposed-module

Read more
akobashikawa's picture

Numberguess en Drupal

Hola,

En este artículo una forma de hacer el juego Numberguess en Drupal: http://akcdev.blogspot.com/2010/07/numberguess-en-drupal.html
Ojalá sea de ayuda.

Read more
bowersox's picture

Drupal 8 Form API Accessibility

For Drupal 8, one of the key areas that needs improvement is FAPI. This will also take significant coordination and good up-front design before we dive in coding.

Here's a PDF of the presentation I submitted for the Core Developer Summit about D8 Form API accessibility:
http://www.ojctech.com/sites/default/files/d8-fapi-a11y.pdf

Here is a more accessible HTML version of the same basic content:
http://groups.drupal.org/node/56703#comment-170798

I'd appreciate any feedback and suggestions.

Read more
legion80's picture

Multiple forms on one page

Hello,

I have been struggling with a forms issue that I thought maybe someone could help answer for me.

Basically I am trying to have several drupal forms laid out in one page, with one "Save" button, which will save all of the forms on the page at once. Each form is already assumed to edit an existing node, so I do not need to worry about the case where the user is creating a new set of nodes from the forms on the page.

Read more
jrockowitz's picture

A module that saves the state of Drupal's collapsible fieldsets.

I figured my first attempt at a custom and hopefully contributed module should be something that is simple and usable, while a little bit challenging.

I love the simplicity of the FAPI collapsible fieldset but I was disappointed that it didn't remember whether I wanted it to be collapsed or open. So this is my attempt at fixing that problem.

Read more
vordude's picture

Drupal 6 Forms API Screencast

This is a very introductory look at Forms API in Drupal 6.

The focus is on basic and practical application, and should allow the newest Drupal programmer to be able to go create his or her own form, in Drupal 6.

Attached is the code for your perusal--It's the same as what's demonstrated in the video, with a bunch of comments. (I would have attached a tarball, but it was not an acceptable file format)

The 30-minute screencast is hosted at blip.tv.

NOTE: In the video, I fail to use check_plain() when outputting some user-generated content...For the sake of you and your web site, don't forget this step. The attached code example is i believe doing it right

Read more
Xano's picture

CCK, Fapilicious and Validation API cooperation

This afternoon TapocoL, cYu and I (Kaaskop @ IRC) discussed the possibilities of CCK, Validation API and Fapilicious to work together on form processing. Currently, CCK features built-in validation for specific fields, like addresses. Fapilicious is a library which (though still under development) features built-in field validation for any form field. Validation API mainly is a UI for creating custom validators and using them for CCK fields.

A few of the ideas:

<

ul>

Read more
Subscribe with RSS Syndicate content