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

How do I add a new flexinode or cck type that automatically uses the js.tools calendar popup?

How do I add a new flexinode or cck type that automatically uses the js.tools calendar popup?

It sounds like it would be simple to do. One for Date and Time, and One for Time only, if possible.

Regards,

Dave

generating a form submit with POST method

I'm developing a payment gateway with a Spanish bank and they want to recibe the payment request with a POST form. All the payment gateway developed I saw use the GET method for the submit. Are there some way to generate a form submit with a POST method with drupal or with PHP? Do you know some payment gateway submiting payment request with the POST method?

Best Regards.

Node preview / submit hooks

I'm creating a custom node module, and am having trouble deciding which hooks to use for various processing tasks. What I'm intending to do is patch together various form values to create the "title" and "body" for my node. Initially I did this in hook_insert and hook_update, which worked well except for one thing. Since these hooks are only called on "submit", when I "preview" the node, it has no title nor body. So I need to place this code into a function that is called on both preview AND submit. Any ideas?

Form API problem

Hello,

As i mentionned in a previous post http://drupal.org/node/75008, i would like to use an autocomplete field and use that result to fill in another field of the form. So i found a solution in drupal 4.7 mentionned in the post. I use JS with the attribute 'Onchange'. Unfortunnatly the new FAPI make an escape an,d the quote is replace by it's hex value (').

In my module code :
$form['find']['ville'] = array(
'#type' => 'textfield',
'#title' => filt('Ville'),
'#default_value' => $session['ville'],
'#size' => 30,
'#maxlength' => 100,
'#autocomplete_path' => 'ville/autocomplete', // autocomplete Drupal
'#attributes' => array('onchange' => 'javascript:document.getElementById(\'edit-codepostal\').value=document.getElementById(\'edit-ville\').value.substr(50,5);javascript:document.getElementById(\'edit-id_city\').value=document.getElementById(\'edit-ville\').value.substr(56,8);javascript:document.getElementById(\'edit-ville\').value=document.getElementById(\'edit-vide\').value'),
'#prefix' =>'

',
'#suffix' =>'

'
);

But in the browser source code the result is

Ville:

Carbon footprint module: suggestions

John,

some first general thoughts about the carbon footprint module:

If the carbon module is implemented in a "general" drupal website, you will probalby have 3 different group of users:

1) anonymous users: They might have never heard about carbon footprints and would simply like to see how much CO2 a car ride or air plane journey of 500 km produces. But they won't want to really calculate and store their complete footprints.

2) interested users: Registered users who are willing to calculate their footprints but the input for the footprint must be as easy as possible. They can accept that the result is only a rough estimate.

3) technically minded users: as from 2) but these users would ask for more precision in calculation. They will be willing to adjust the carbon sources as exactly as possible to their need.

With your own website you are obviously targeting group 2. (It would be interesting to know, how you are getting these users.) For most websites, I guess you would start with group 1 and a certain percentage of group 1 gets really interested and becomes a member of group 2. In other words: for the "success" of this module, group 1 should be offered something as well.

For anonymous users I suggest to offer a relatively simple CO2 calculator, as you can find many of them on Internet. It could be a page where you choose a carbon source from the list, enter the quantity, hit a "calculate CO2" button and get the result. Most likely, this is very easy for you to implement.

tagUser like tagNode

tag node module create terms with 'node title' when new node create.

is there any module that create ROLE with 'username' when a user create ?
if there is not any kind of module to help me to do this, how i can do this ?

create new ROLE with USERNAME when new user register or created.

Pages

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