fapi

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.

13 comments · 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

9 comments · Read more · 2 attachments
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>

4 comments · Read more
sime's picture

Embed process should be like forms api?

In writing SWF Tools I attempted to follow some design patterns that would make the embedding aspect of it generic. The embedding logic is there, but it's surrounded by a lot of unreleted code. So with the benefit of hindsight, here is a run-through of an "Embed API". Much of this is simply cloned Forms API.

3 comments · Read more
starbow's picture

Ahah Forms v1.5 - Secure Dynamic Subforms

At the Drupal Summit, chx & eaton let me know that avoiding the FormAPI security by directly accessing $_POST was a bad idea. So I dropped the slide out of my presentation that talked about how to create dynamic subforms, and spend the last two weeks hacking like mad. I now have an approach that I believe combines convience and security. It is packaged up in Ahah Forms v1.5 as the dynamic_subform.module. It uses the same basic algorithm as drupal_get_form when #multistep is true (but is incompatible with #multistep, so don't try to use both of them).

I have a full write up at: Secure Dynamic Forms and Subforms, but here is an example of the functions in use:

6 comments · Read more
adrian's picture

CCK and FAPI 2.0 as Relationship API

One of the things I came away with from the Vancouver DrupalCon, is that we already have our relationship API, in the form of CCK and what I want to do with forms 2.0.

Firstly, in forms 2.0, there will be 2 discrete steps.

Step 1: Defining Fields for form. (or node type, or whatever)
Step 2: Placing these fields within their final form structure (add tables, fieldsets etc).

Now I am basing this functionality off of the cck field definitions, so that all the validations and field type
code will be built using cck, and one of these field types is 'nodereference'

CCK already handles all the 'has, can have and single / multiple' bits of the relationship api, and with

2 comments · Read more
Syndicate content