This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Validation of a Module's Settings Form Fields

I have not been able to find how I can validate the settings of a module that are created with the hook_settings. When the user presses submit, then we should check that the data that he filled in the various form fields are valid. E.g. number fields should be verified to only contain numbers, the format of e-mail addresses should be verified, ...

I know that we use the _validate hook for validation of the fields on the module's nodes. But how are the settings of the module itself validated?

Could somebody give a pointer to information how this can be done?

Date sorting on table manager

I've currently got Table Manager v4.6 which doesn't sort by date
I've tried to find out in the latest version now has this before upgrading. Can anyone confirm this?
If so what would be the date format to use?
Thanks

smtp

Hi,

Do not of that is the right forum...

I downloaded installed smtp.module as in INSTALL.txt.

I get this error

* warning: fsockopen() [function.fsockopen]: unable to connect to smtp.blixtmail.se:25 (Permission denied) in /var/www/html/modules/smtp.module on line 1834.
* warning: fsockopen() [function.fsockopen]: unable to connect to smtp.blixtmail.se:25 (Permission denied) in /var/www/html/modules/smtp.module on line 1834.

Form Validation and Presentation

Hello,

I'm trying to add a new module that presents a new node type called 'article.'

This is different from the default story/page nodes in that it should have an additional form field that takes an integer. This integer corresponds to the vBulletin Thread ID where users can comment on the article. (Assumes that the thread is already created)

First, I need to validate that the number in the field is an integer. But I wanted to test to see if my validation code is getting picked up at all by first setting the field to not required, and then the logic to return an error if a single 'x' character is entered. Unfortunately, it didn't seem to pick up on this and so my validation code isn't working. Here it is:

/**
* Implementation of hook_form().
*/
function article_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('New WDS Article Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
$form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('WDS Article Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
$form['body_filter']['format'] = filter_form($node->format);
$form['forum_link'] = array('#type' => 'textfield', '#title' => t('Associated Thread ID'), '#forum_link' => t('Thread ID'), '#required' => TRUE, '#default_value' => t(''), '#weight' => 2);

Want Little help

Hi I m Mayank Jaitly and I m new in drupal and i m trying to devlop the site and I have created the sign up form in that but I want it split it into three pages and can anybody tell me that how it is possible.

the site url is : www.mastechindia.com/final

UIEForum module not behaving with Drupal security contexts??

Full disclosure: Newbie... but I RTFM all the time, so hopefully not wasting yer time here.

Installed and configured uieforum with no problem in sites/defaults/modules/... It's awesome. I configured access rights so that authenticated and anon users can view forum. I disabled the old forum system.

If I log onto my site and click on various primary menu items, everything works fine.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions