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

form_checkbox woes

Hello everyone,

I'm working on a module for which I need autoexpirability for content. I want a checkbox to allow users to choose whether or not it should automatically expire or not. The only problem is that I am having trouble with the form_checkbox function. I write my form checkbox in the form post of the node_api like this:

$form .= form_checkbox(t('Expire after end date: '),'expires',$node->boolexpire = 0, $checked=FALSE,$description=NULL, $attributes=NULL,$required=FALSE);

Search

Hi,

I've found out that the Drupal search function aint that great. As problebly many of you guys have noticed also.

Is there any major update for the search function?

Or would it be a clever choice to implement one of the allready well known Open Source Search Engines? ZEBRA or someone like that.. but there is many of them...

Anyways. A search with better indexing and more options would be great.

Form Updater Module

After some frustration trying to map the old form functions to the new array keys for use in the new Drupal 4.7 form API, I decided that there ought to be a way to automate this process.

use html in textfield of poll.module?

hi guys~

I would like to use text link when writing choices in poll. But when i show the choice, html code will transform <, > to &lt; , &gt; .
I've review the poll.module and many other files in includes/, but I can't find where to control this mechanism.

Could someone tell me which files or functions needed to review, to solve my question.

thanks~

how could I extend "user" type

Hi everyone,
I have a problem: I should associate every user on a site with my own group (there are "mygroups" table in a DB), so how can i do that?

The complex way is to create a table with 2 foreigh keys "mygroup_id" and "uid" in it. Is there any other way to extend user type in Drupal?

Couple of questions re: my Tablemanager module problems...

Here's a link to my newest module: http://drupal.org/node/37339

Whilst I know I should be concentrating on my other module which needs a whole lot more work, I feel that taking a break from it has given me more ideas about how to handle it which is all good :o) But not what this post is about...

In my newest module, on the page: http://drupal.org/project/Modules My module has the embarrassingly longest preview... I've completely forgotten how to put my own line break in it, could somone please let me know!!! :o) Thanks!

The module works fine as it is, but I've been perfecting it ;o) I've come across a problem though with the way I've done something with it. Here's an example (easier to follow than the real code!):

function tablemanager_tableadd() {
if(isset($_POST['create'])) {
if (!form_get_errors()) {
//create db entry
}
}
if(isset($_POST['submit'])) {
if (!form_get_errors()) {
//display fields and let user name them
//make 'create' button
}
}
//main code
//allow user to name table and set how many columns are in table
//make 'submit' button
}

Now all that works absolutely beautifully :o) Unless the user enters something the validation doesn't like... For the first screen it's fine because the code 'runs though' into the first part and marks the box in red where there's been an input error. However for the second screen, when the user makes a mistake they're sent back to the very first screen because the second screen is 'hidden' by the isset($_POST['submit']) statement. I was under the impression that I could set the POST variable manually so that the user will be nicely shown what he's entered wrongly? If I type:

Pages

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