fapi

Events happening in the community are now at Drupal community events on www.drupal.org.

Caching AJAX results

Posted by andy inman on November 21, 2012 at 8:26pm

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
9 comments Categories: , ,

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

Posted by texas-bronius on January 13, 2011 at 5:21pm

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

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

Posted by texas-bronius on January 13, 2011 at 5:20pm

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

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

Posted by mlncn on December 18, 2010 at 12:20am

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
3 comments Categories: , , , ,

Numberguess en Drupal

Posted by akobashikawa on July 5, 2010 at 4:17pm

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
Categories: , ,

Drupal 8 Form API Accessibility

Posted by bowersox on April 2, 2010 at 3:25pm

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
Categories: ,

Multiple forms on one page

Posted by legion80 on February 21, 2010 at 8:26am

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

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

Posted by jrockowitz on March 12, 2009 at 3:57pm

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

Drupal 6 Forms API Screencast

Posted by vordude on September 9, 2008 at 5:31am

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

CCK, Fapilicious and Validation API cooperation

Posted by xano on August 18, 2008 at 5:32pm

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

AltStyle によって変換されたページ (->オリジナル) /