Right now this is a support request, I will change this too documentation when I get it working.
I wrote a possible Handbook page for the d5 version to set the default value, however something has changed The code for D6 on form_alter is not working. Currently I am using
function quiltmenu_form_alter ($form_id, $form_state, &$form) {
if ($form_id == "showandtell_node_form" && is_numeric(arg(3)) && arg(3)>0 && (arg(3)==53) {
$form['taxonomy'][24]['#default_value']=array(0 => arg(3));
}
}
However this does not work on D6 :(
Any suggestions or leads so that I may publish a d6 version of this handbook, while also upgrading my personal module to handle the new version of drupal as I migrate to d6?
Comments
Comment #1
MGParisi commentedMore details, the taxonomy default value is changed. However the value in HS does not always act appropriately. It never shows the right value, sometimes it disables HS on the page, while other times it sets it to the first value. The later causes an error when the user changes the HS value. I know d6 is in dev, I hope to get a semi-working solution so that I can mark on more thing off my Migration Checklist.
Comment #2
MGParisi commenteddamn it, I messed up the function call... It still doesnt work, I just didnt change it back when I wrote the other handbook... the function is
function quiltmenu_form_alter (&$form, $form_state, $form_id) {
Comment #3
MGParisi commentedI upgraded to the latest dev (I was one version behind) and did a bit more with the code...
ok, the current code that works for d6 on my site is (and it works)...
Can you just verify so that I may make it into a handbook page. I will use a modified version of my d5 handbook page to make this one. You dont need to test it, just look at it and see if it makes sense! Please change the assignment to me if that is ok?
Comment #4
wim leers