This topic is locked

How can i make the checkbox already checked

3/15/2007 7:53:11 AM
PHPRunner General questions
D
datapimp author

Hi

this is such a small thing but i need to know how i can have a checkbox already checked ...

i've been doing my head in with this.
any healp would be great

J
Jane 3/15/2007

Just set up 1 as default value of this field on the "Edit as" settings dialog on the Visual Editor tab.

D
datapimp author 3/15/2007

Thanks for the quick reply ... i've tryed doing u suggested but, it doesn't seem to say at that value (1).. once i build the site its stays unticked no matter what i type ...
i'm using the latest build (218)

J
Jane 3/15/2007

What is the type of this field in the database?

D
datapimp author 3/15/2007

it is varchar .. i also changed it to int (but i didn't reset the page) ... still no good ...

J
Jane 3/15/2007

Thank you for pointing me to this bug.

We'll fix it in the next PHPRunner update.
To make your pages working please open C:/Program Files/PHPRunner3.2/source/include/commonfuntions.php file, locate BuildEditControl function, find this code shippet:

if($data[$field]&& $data[$field]!=0)

$checked=" checked";



and replace it with this one:

if($value && $value!=0)

$checked=" checked";


Then rebuild your pages and use 1 as default value for your field.

D
datapimp author 3/15/2007

Yes it worked ...
thank you very much for you quick fix <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=16285&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />

E
evan_ad2000 3/18/2007

Thank you for pointing me to this bug.

We'll fix it in the next PHPRunner update.
To make your pages working please open C:/Program Files/PHPRunner3.2/source/include/commonfuntions.php file, locate BuildEditControl function, find this code shippet:
and replace it with this one:

Then rebuild your pages and use 1 as default value for your field.


Hi,
I was just wondering, with regards to check boxes, can i do something so that the value of the checkbox (1or0) depends on some calculation?
Cheers,

Evan

J
Jane 3/19/2007

Evan,
you can do it using Before record added event on the Events tab or custom Javascript code.

You can post structure of your table along with detailed descriptiopn of what you want to achieve and I'll try to help you.