forms api

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

Missing 10,000 foot understanding of what HTML5_Tools provides with Forms API

Posted by fbrier on August 20, 2015 at 12:41am

I put together the beginnings of a module with a form using the Forms API. It had nested fieldsets and looked pretty good with the default Bartik theme. When I saw the HTML5 support for email, tel and number fields, I tried to use them by installing elements module and then the html5_tools module, and finally the Omega theme. I am assuming Omega is needed for HTML5 support, although I have not seen any specific mention of it.

Read more

Custom CCK type with WYSIWYG editor

Posted by wvrent on March 7, 2013 at 10:01pm

Has anyone got experience with creating custom multipart CCK fields in Drupal 6?

I'm creating a custom field (titleandbody_fld) that has a Text field and a Textarea field with unlimited values. The Textarea is (by default) HTML with WYSIWYG turned on.

Read more
Categories: , ,

Extract media filename

Posted by wftl on October 17, 2012 at 1:55am

Hello everyone,

Newbie question and first post to the local group!

For reasons I can't quite understand, I'm trying to teach myself a little Drupal module development. Apparently just setting things up and keeping them running isn't enough. Anyhow, I've built a little module that takes bits of information, artist name, title of work, etc, and lets you select a cover file. The whole thing gets passed to an external script which is already working (Linux command line I can deal with).

Read more
2 comments Categories: , ,

Filtering assoc array returned from variable_get()

Posted by rgchi on August 16, 2012 at 4:01pm

Given this checkboxes form field for a drupal module

$form['soc_eport_expireByFiletype'] = array(
'#type' => 'checkboxes',
'#title' => t('Select file extention'),
'#default_value' => variable_get('soc_eport', array('gif'=>'Gif')),
'#options' => array(
'gif' => t('GIF'),
'jpeg' => t('JPEG'),
'jpg'=> t('JPG'),
'png' => t('PNG'),
),

);

It produces this array:

Array
( [gif] => gif
[jpeg] => jpeg
[jpg] => 0
[png] => 0
)

Read more
1 comment Categories: ,

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

Using a form to update data

Posted by mettam on March 26, 2010 at 4:26pm

I'm in my first attempt at building a custom module and I've run into a problem I can't seem to find an answer for. It's a task I've done a millions times using various scripting languages, but despite hours pouring over the Forms API and other resources, I cannot figure out how I'm supposed to do this. And I'm sure someone is going to point to some simple thing I'm missing here....

Read more
5 comments Categories:

Template Files and Panels add/edit forms

Posted by montesde on February 23, 2010 at 12:04am

I'm using Panels extensively and I'm trying to override the add/edit form of a content type. I themed the content types edit form by registering the template file in template.php and then creating the a template file called node-meeting-edit.tpl.php. When I used panels to override the add/edit form and added the general form pane, the form went back to its original display. If I disable the form, everything works fine. Is there a way to get panels to use the template file for the forms? I have a feeling i may have to go the route of using the Forms API.

Read more

Creating a backend interface to registration (theming a drupal form)

Posted by jdwfly on May 27, 2009 at 6:12am

Basically we have a registration page on our site for a van shuttle that runs at several different times. A person can go to this form and select the time for the shuttle along with some other options. These are stored in a separate table (called shuttle), but I need to make a nice admin interface for this. I want something along the lines of the user admin page that has a table with the information in rows and checkboxes down the side. There also needs to be a drop-down with actions in it (i know how to do that).

Read more

Selecting a radio button using JQuery

Posted by drob on July 21, 2008 at 6:14pm

Help appreciated -

I'm building a node form where the form will reveal/hide portions depending on the users choices. To do this I'm using jQuery to manipulate the DOM. I'm having a lot of issues with the radio buttons.

Read more

Evil with Forms API in 6.x

Posted by pwolanin on July 9, 2007 at 1:44am

A small follow-on to brilliant past posts by Moshe and Angie:
How to dizzy the next guy
#DANGEROUS_SKIP_CHECK: the most evil of the Form API properties

Since core is mostly frozen, I'm thinking of evil ways to use new features in the Forms API for 6.x.

Read more
Categories: ,
Subscribe with RSS Syndicate content

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