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

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.

How to maintenance 2 module version?

Currently I have 2 folder on my local PC: blogger/5 and blogger/4 which contain blogger.module for Drupal 5 and 4.
I also create 2 branch using SmartCVS: DRUPaL-4-7 and DRUPAL-5, now how do I associate:
- DRUPAL-4-7 to c:\blogger\4
- DRUPAL-5 to c:\blogger\5

Why so difficult to maintenance Drupal module?

As third party Drupal module developer I found that managing Drupal module very difficult. Even I already use Smart CVS, I can not find an easy way to UPLOAD my revised module.

I suggest Drupal team to provide us a web based module repository. So I can:
- Login to the repository
- Create my own revision number and there is a dropdown box that listed all Drupal version for compability

The one on sourceforge.net is a good example.

Taxonmy ebay style

On my site i have many categories. I wish i could have an ebay style feature for selecting categories. Take a look on how ebay does it. How would this be done? I am thinking some type of Ajax integration.

Image:
http://pics.ebaystatic.com/aw/pics/tutorials/manageStoreCat/scr4SCStep2_...

Source:
http://pages.ebay.com/stores/customcategories/tutorial/2.html

Pages

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