Checkbox position

swlabhot 22 Sep, 2008
Using the CheckBox field places the label on the left in a column and the check boxes around the middle of the page which looks very odd. Like this:

1)This is the a) Check box 1
question to b) Check box 2
the various c) Check box 3
check box d) Check box 4
answers? e) Check box 5

Rather than the above it should look like this:

1) This is the question to the various check box answers?

a) Check box 1
b) check box 2
c) check box 3
d) check box 4
e) check box 5

How can I reposition them so they look like the latter?

Also, why does it capitalise the first letter of every word in the sentence for the check box answers? (e.g, Why Does It Capitalise The First Letter Of Every Word In The Sentence For The Check Box Answers?). How can I correct this?

Steven
Max_admin 23 Sep, 2008
Hi Steven

Mainly Chronoforms is used to take your HTML and make a form, the wizard was recently added to help very novice users, it gives you the ability to create a form easily and quickly but of course it has limitations, this is not Adobe dreamweaver or MS frontpage!🙂

so, for those changes you will need to edit the form code generated!

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
swlabhot 11 Oct, 2008
Any idea how I cn edit the form code to get the format listed correctly?
GreyHead 11 Oct, 2008
Hi swlabhot,

Click the Form Code tab then open the Form HTML box by clicking the ± symbol.

Bob
swlabhot 11 Oct, 2008
I know how to get to the code, its just that I have trouble understanding the code so not oo sure which part to edit🤣
Max_admin 12 Oct, 2008
Hi Steven,

what about removing the whole checkboxes label and added add a "text" entry just above the boxes so it looks like the question and checks are the answers ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
swlabhot 13 Oct, 2008
Hi Max, I tried this and my whole front page menu and text alignment went all over the place! Plus the text for the answers all shrunk in size..
Hmm this is going to take a while to figure out..🙄
Max_admin 14 Oct, 2008
Ok, the only way now then is to create the form with wizard then edit the HTML code saved later to do this, I know may not be too easy if your never seen HTML but this is one of the most straight forward issues.

Cheers,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
swlabhot 14 Oct, 2008
OK here is the HTML code that has been generated by the form wizard. One checkbox question and 3 answers as laid out in the format:

1) This is first a) answer 1
question as you b) answer 2
can see appears c) answer 3
all on the left
<DIV class=form_item>
<DIV class="form_element cf_checkbox"><LABEL class=cf_label>Here lies the question</LABEL> 
<DIV class=float_left><INPUT class=radio id="a)_Answer 1" type=checkbox value="a) Answer 1" name="a)_Answer 1"><LABEL class=check_label for="a)_Answer 1">A) Answer 1</LABEL><BR><INPUT class=radio id="b)_Answer 2" type=checkbox value="b) Answer 2" name="b)_Answer 2"><LABEL class=check_label for="b)_Answer 2">B) Answer 2</LABEL><BR><INPUT class=radio id="c)_Answer 3" type=checkbox value="c) Answer 3" name="c)_Answer 3"><LABEL class=check_label for="c)_Answer 3">C) Answer 3</LABEL><BR></DIV></DIV>
<DIV class=clear> </DIV></DIV>


What part of the code above do I have to edit to get it to this format:

1) This is first question as you can see appears all on the left
a) answer 1
b) answer 2
c) answer 3

Any help would be greatly appreciated as this is taking so much of my time is not even funny!

Thanks,
Steven
Max_admin 14 Oct, 2008
your code should look like :
<<DIV class=form_item>
<DIV class="form_element cf_checkbox">
<DIV class=float_left><span>Here lies the question</span><br><INPUT class=radio id="a)_Answer 1" type=checkbox value="a) Answer 1" name="a)_Answer 1"><LABEL class=check_label for="a)_Answer 1">A) Answer 1</LABEL><BR><INPUT class=radio id="b)_Answer 2" type=checkbox value="b) Answer 2" name="b)_Answer 2"><LABEL class=check_label for="b)_Answer 2">B) Answer 2</LABEL><BR><INPUT class=radio id="c)_Answer 3" type=checkbox value="c) Answer 3" name="c)_Answer 3"><LABEL class=check_label for="c)_Answer 3">C) Answer 3</LABEL><BR></DIV></DIV>
<DIV class=clear> </DIV></DIV>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 15 Oct, 2008
Hi swlabhot,

Max's formating is good but there are some ')'s and spaces left in the attribute values that will cause problems:
<div class="form_item">
<div class="form_element cf_checkbox">
<div class="float_left"><span>Here lies the question</span>
<br />
<input class="radio" id="q1_answer_a" type="checkbox" value="a) Answer 1" name="q1_answer[]">
<label class="check_label" for="q1_answer_a">A) Answer 1</label>
<br />
<input class="radio" id="q1_answer_b" type="checkbox" value="b) Answer 2" name="q1_answer[]">
<label class="check_label" for="q1_answer_b">B) Answer 2</label><br>
<input class="radio" id="q1_answer_c" type="checkbox" value="c) Answer 3" name="q1_answer[]">
<label class="check_label" for="q1_answer_c">C) Answer 3</label>
<br />
</div>
</div>
<div class="clear"> </div>
</div>

Bob

PS Note that having checkboxes allows more than one answer (they will be returned in an array here); if you want one answer only then you need radio buttons and the names can all be "q1_answer" as there will only be one value returned.
swlabhot 15 Oct, 2008
Hey Max & Bob thanks a million! It works! You don't know how relieved I am to have fix this last bug (hopefully!) on my site. No finally I can move on!

You guys have been very helpfull 😀
swlabhot 15 Oct, 2008
Oh no I'm back again! Just one more bug to sort out..😶

I have the results emailed over to me everytime the user submits the form. The layout format of the email template has been created by the auto generator. However the result contains ALL of the answers regardless of which one has been ticked. I only want the result of the ones that are ticked otherwise I would not know which answers they have chosen! Why is this happening?

Rgds, Steven
GreyHead 15 Oct, 2008
Hi swlabhot,

What are you actually getting in your email? Here's what i see - the first column are the questions, the second column show the one answered. (Agreed the text isn't very helpful but that's easy to change.)

Bob

Later: sorry, You do need to swap the columns over in the tempalte or you get misleading results.

[attachment=0]15-10-2008 13-17-45.png[/attachment]
GreyHead 15 Oct, 2008
. . . this one has the columns swapped over and the input values changed to 'yes'

Bob

[attachment=0]15-10-2008 13-25-46.png[/attachment]
swlabhot 15 Oct, 2008
Bob, all I get is:

1) Question 1
A) Answer 1
B) Answer 2
C) Answer 3

So I get the exact same questions and answers as it is laid out on the form with no indication of what answer/s they have picked. Am I missing something here?

Here is the code from the emai template:

1) Question 1?
{a)_Answer 1}A) Answer 1
{b)_Answer 2}B) Answer 2
{c)_Answer 3}C) Answer 3
GreyHead 15 Oct, 2008
Hi swlabhot,

Is this closer?
Form code:
<div class="form_item">
<div class="form_element cf_checkbox">
<div class="float_left"><span>Here lies the question</span>
<br />
<input class="radio" id="q1_answer_a" type="checkbox" value="a" name="q1_answer[]">
<label class="check_label" for="q1_answer_a">A) Answer 1</label>
<br />
<input class="radio" id="q1_answer_b" type="checkbox" value="b" name="q1_answer[]">
<label class="check_label" for="q1_answer_b">B) Answer 2</label><br>
<input class="radio" id="q1_answer_c" type="checkbox" value="c" name="q1_answer[]">
<label class="check_label" for="q1_answer_c">C) Answer 3</label>
<br />
</div>
</div>
<input type='submit' name='submit' value='Submit' />
<div class="clear"> </div>
</div>
Template code:
1) Question 1 : {q1_answer}

Bob

[attachment=0]15-10-2008 14-50-48.png[/attachment]
swlabhot 15 Oct, 2008
Hey Bob, I'm a little confused with your code, if you could please clarify.

"q1_answer_a" - is the whole first answer, correct?

value="a" - should I be typing this exactly as it appears?

name="q1_answer[]" - do I type in the whole first answer here like q1_answer_a here as you have omitted the 'a' and put square brackets instead?

>A) Answer 1 - again should this be the whole of answer a itself just like "q1_answer_a"
Max_admin 15 Oct, 2008
Hi, just copy the code as it is, no changes, I see Bob just edited the original code you provided!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
swlabhot 15 Oct, 2008
You guys are legends! It works just like you shown it! Thanks once again!

Just one more question, complete noob as u can see🤣

How can I modify it so that instead of displaying 1) Question 1 : a, c,

I would like it to display like in your previous reply:

1) Question 1
a) answer 1 yes
b) answer 2
c) answer 3 yes
Max_admin 16 Oct, 2008
if so then the form code now should be:

<div class="form_item">
<div class="form_element cf_checkbox">
<div class="float_left"><span>Here lies the question</span>
<br />
<input class="radio" id="q1_answer_a" type="checkbox" value="yes" name="q1_answer1">
<label class="check_label" for="q1_answer_a">A) Answer 1</label>
<br />
<input class="radio" id="q1_answer_b" type="checkbox" value="yes" name="q1_answer2">
<label class="check_label" for="q1_answer_b">B) Answer 2</label><br>
<input class="radio" id="q1_answer_c" type="checkbox" value="yes" name="q1_answer3">
<label class="check_label" for="q1_answer_c">C) Answer 3</label>
<br />
</div>
</div>
<input type='submit' name='submit' value='Submit' />
<div class="clear"> </div>
</div>



and the template code should be :


1) Question 1
a) answer 1 {q1_answer1}
b) answer 2 {q1_answer2}
c) answer 3 {q1_answer3}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
swlabhot 16 Oct, 2008
Great Max, that seems to be good. I'm also trying to add some questions with 'radiobutton' answers to the same form. How would this be integrated nicely with the checkbox questions in the same form?

TIA!
Max_admin 17 Oct, 2008
@swlabhot, just the same, replace checkboxes with radios or add more code with the same structure!

@siva, this is HTML code to put into your HTML box! what exactly doesn't work ?

Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
swlabhot 17 Oct, 2008
I tried it replacing 'checkbox' with 'radiobutton' but for some reason it still allows me to pick more than one answer just like the checkboxes rather than just allowing one answer? Heres the code:

<div class="form_item">
<div class="form_element cf_radiobutton">
<div class="float_left"><span>2) Question 1 here?</span>
<br />
<input class="radio" id="q1_answer_a" type="radio" value="yes" name="q1_answer9">
<label class="radio_label" for="q1_answer_a">a) bring it on, I can’t wait!</label>
<br />
<input class="radio" id="q1_answer_b" type="radio" value="yes" name="q1_answer10">
<label class="radio_label" for="q1_answer_b">b) don’t really feel like it but I need to get fit!</label>
<br>
<input class="radio" id="q1_answer_c" type="radio" value="yes" name="q1_answer11">
<label class="radio_label" for="q1_answer_c">c) trying to think of an excuse not to turn up..</label>
<br />
<input class="radio" id="q1_answer_d" type="radio" value="yes" name="q1_answer12">
<label class="radio_label" for="q1_answer_d">d) damn I hate that slave driver!</label>
<br /></div></div>
<DIV class=clear > </DIV></DIV>
GreyHead 17 Oct, 2008
Hi swlabhot,

For radio buttons to work as a 'group' in that way they must all have the same name.

Bob
This topic is locked and no more replies can be posted.