Missing 10,000 foot understanding of what HTML5_Tools provides with Forms API
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 moreCustom CCK type with WYSIWYG editor
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 moreExtract media filename
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 moreFiltering assoc array returned from variable_get()
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
)
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 moreUsing a form to update data
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 moreTemplate Files and Panels add/edit forms
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 moreCreating a backend interface to registration (theming a drupal form)
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 moreSelecting a radio button using JQuery
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 moreEvil with Forms API in 6.x
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