Checkbox pre-checked before submit

raygold 24 Feb, 2011
I'd like to know if is possible make some checkbox pre-checked when the form appears .
Maybe I should add custom code in "On Submit code - before sending email"?Which code?
GreyHead 24 Feb, 2011
Hi raygold,

Edit the Form HTML in the Form Code tab and add checked="checked" to the input that you want to have checked.

Bob
raygold 24 Feb, 2011
Thank you Bob,Can I do the same with textbox or radio button?
Which code should I add?
GreyHead 24 Feb, 2011
Hi raygold ,

A radio button group is the same; use selected="selected" for a drop-down.

I don't think that it means anything to have a text input pre-selected. You can set a value with value="some text" though.

Bob
raygold 24 Feb, 2011
Thank you again,and thanks for Chronoforms that's one of the most powerful joomla components.
RoJa 04 Aug, 2011

Edit the Form HTML in the Form Code tab and add checked="checked" to the input that you want to have checked.


I want to see pre-checked values in my form in CheckBox Group element ....

When I do this, then save - all OK. But if I want to edit my form again (I do this via Wizard in Edvanced mode) - this code disappeared 😟

I'm tried to add value in field Checked value, but this don't work. 😫
That meens that I need to add my code every time when edit my form ??? :?
GreyHead 04 Aug, 2011
Hi RoJa,

Adding the value in Checked Value should work - it does need to be the same whatever show in the value='????' part of the Form HTML

Bob
RoJa 04 Aug, 2011
I want to pre-check value in Checkbox Group

Where I'm wrong ?

[attachment=1]checkbox_group_01.jpg[/attachment]

Result:

[attachment=0]checkbox_group_02.jpg[/attachment]
GreyHead 04 Aug, 2011
Hi RoJa,

Just put choice_2 in the box - not quotes, no value=

Bob
RoJa 05 Aug, 2011
No effect ... 😟

[attachment=1]checkbox_group_03.jpg[/attachment]

Form :

[attachment=0]checkbox_group_04.jpg[/attachment]
GreyHead 05 Aug, 2011
Hi RoJa,

By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.

Bob
RoJa 05 Aug, 2011
All this - for a corporative site, so I can't do this ... (I hope you understand me, why) 8)
Tell me what I need to do - I'll do this.
GreyHead 05 Aug, 2011
Hi RoJa,

It's working OK here.

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
RoJa 08 Aug, 2011
TestForm backup in attachment.

Аnyway thanks.
RoJa 24 Aug, 2011
GreyHead, did you find a solution of this problem? I need to move on, but I cant ... HELP! 😫
GreyHead 24 Aug, 2011
Hi RoJa,

If I restore your form into my site then there is no checked value. But as soon as I re-save it in the admin area and re-load the form page the checked value shows correctly :-(

Please check that you have the latest release RC1.9 and that there are no extra spaces in the Checked value box.

I don't know what else to suggest :-(

Bob
RoJa 24 Aug, 2011
This is wonderful! As soon as I installed RC 1.9 over RC 1.8, and re-save the form again - it worked !!! 😀
I did not know that there are already Chronoforms v.4 RC 1.9, sorry ... :?

Many, many thanks !
This topic is locked and no more replies can be posted.