Form API

This group will talk about how to enhance form API. And also, we will realize that we talk of so please subscribe only if you are ready to code.

adrian's picture

Forms API reaches version 2.0

Login to post comments
chx's picture

A better notation?

I have a wild idea, but this is the place to post them.

Let's say you have

$form['level1']['level2']['#options'] = array(....);

instead, let's close the leveling with a ['_'] and omit the #.

So.

$form['level1'][''] = array('type' => 'checkboxes', 'options' => array('this', that'));
$form['level1']'level2']['
'] = another form API element here.

This would save a lot of #.

Some code:

4 comments · Read more
chx's picture

Dynamic forms

One of the biggest problems with form API is that we need the form API array as it was when the form was created so that we can set values for it. And also we need a current form array to be rendered. This will solve upload problems, multipage forms, poll etc etc.

Let's discuss how to handle this problem.

10 comments
Syndicate content