Posted by thechanceg on May 6, 2010 at 7:22am
I have a customer that is requesting that a checkbox on an administrative form in ubercart be checked automatically on page load. I have used rules to alter forms before but wasn't sure if this was possible.
I tried setting up a triggered rule for "Uc cart checkout form is being built", with the action of "Set Default Value of Form element" with the values; 0, 1, Yes, Checked & On. None of these settings worked.
Can anyone please point me in the right direction on making this happen? Thank you for taking the time to read my question.
Comments
Dig Ubercart code...
I haven't looked very deeply into Ubercart, but much of the code and procedures used there are specific for Ubercart and do not follow the general Drupal way of doing things.
It is possible that the form you want to alter is not really a Drupal form, but something that is built by Ubercart in a particular way. My best advice is to as the Ubercart folks on how to alter the form, if the standard procedures don't work (which they seem not to).
Sorry.
//Johan Falk, NodeOne, Sweden
Thank you
I came to the same conclusion after MUCH testing.
I ended up just editing the module to make the checkbox checked by default. Not something I normally like to do, but it got the job done.
Thank you so much for taking your time to look into it.