Focal Point
[CLOSED] By default checkboxes behave like radio buttons.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/652109671

July 10, 2009, 11:38 AM
awendt
[CLOSED] By default checkboxes behave like radio buttons.
When I create checkbox in HTML Layout Painter, by default, when I run the HTML page it only allows the user to select one checkbox, like a radio button. How do I set it up to select multiple values?

This message has been edited. Last edited by: Kerry,


Webfocus relase 764
Linux
All mentioned including AHTML
July 10, 2009, 05:57 PM
Tony A
I think the first thing you should endeavour to do is to learn a little HTML to understand your problem, especially if you are expected to be able to create launch pages.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
July 10, 2009, 10:31 PM
Doug
What, no PMs Tony? Send me one...
July 12, 2009, 04:18 AM
GamP
I'll give one hint: look at the names of the checkboxes.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 12, 2009, 06:58 AM
Tony A
Doug,

Sent ......
July 12, 2009, 11:13 AM
Doug
awendt, delete the offending checkbox control and regenerate the request button to re-add the checkbox...

Update your Focal Point profile so we know what versions of what you're running as different versions may have different solutions... And Learn DevStudio...
July 13, 2009, 10:58 AM
awendt
First, Tony A and GamP ... thanks for helping me figure out what the "ignore list" is and how to use it to weed out annoying people who act like they are smarter than everyone else. Puffing themselves up putting other people down.

Second, can someone give me a straightforward, non-deprecating, concrete answer to what I'm trying to accomplish? Also, if you are like Tony A and GamP and are clearly too intelligent to answer a simple, straightforward question; please, save your dazzling intellectual might for a better cause. Solve world hunger, or get a life or something that is worthy of your profound brilliance.


Webfocus relase 764
Linux
All mentioned including AHTML
July 13, 2009, 11:17 AM
Tomsweb
Awendt,

Checkboxes allow you to receive multiple values. Like radio buttons, all checkboxes
in a set have the same name but different values.
However, unlike radio buttons, a visitor is free to choose one or more checkboxes.

quote:


What kind/s of music do you listen to?


Rock


Reggae


Pop


Rap


Metal





Is it possible that you are not following the example above with regard to
the name/value pairs? I see the point that GamP and Tony A are trying to
make.

I hope this helps.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
July 13, 2009, 11:19 AM
Tomsweb
Checkboxes allow you to receive multiple values. Like radio buttons, all checkboxes in a set have the same name but different values. However, unlike radio buttons, a visitor is free to choose one or more checkboxes.

Let's see how we can extract the value of a checkbox.

quote:

<form name="orderform">
What kind/s of music do you listen to?<br>
<input type="checkbox" name="music" value="Rock" checked="checked">
Rock<br>
<input type="checkbox" name="music" value="Reggae">
Reggae<br>
<input type="checkbox" name="music" value="Pop">
Pop<br>
<input type="checkbox" name="music" value="Rap">
Rap<br>
<input type="checkbox" name="music" value="Metal">
Metal<br>
<input type="submit" onclick="get_check_value()">
</form>


Is it possible that you are not following the example above with regard to
the name/value pairs? I see the point that GamP and Tony A are trying to
make.

I hope this helps.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
July 13, 2009, 11:38 AM
awendt
OK. I see that if I create MULTIPLE checkboxes, the checkboxes can be multi-selected. But I'm trying to use a single checkbox control, populate it with "Dynamic" values (from a synonym), and have the user select multiple checkboxes, values taken from the values in a synonym.

For example, suppose I have a synonym with first names: "Joe", "Bob", "Mike". I use the parameters tab to import the values from the synonym, and automatically populate "Joe", "Bob", "Mike" into checkboxes (which, by the way, I can get to work.) When I run the HTML form, however, it only allows the selection of one, single checkbox (either Joe, or Bob, or Mike) to be selected. I want muliple selections so in my parameterized call to a procedure, I can use a where clause to say, for example, where "Fname contains &FNAME_PARMS."


Webfocus relase 764
Linux
All mentioned including AHTML
July 13, 2009, 11:43 AM
Tomsweb
For multiple checkboxes, you need to load them into an ARRAY to process them as a list.

If your checkbox has the same name attribute, then add [] to the name

quote:






If all checkbox are checked, it will return an array as follow array("1","2","3").
...
You can then add some js to handle the incoming data.

Hope this helps


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
July 13, 2009, 11:45 AM
Tomsweb
If your checkbox has the same name attribute, then add [] to the name:

quote:

<input type="checkbox" name="test[]" value="1">
<input type="checkbox" name="test[]" value="2">
<input type="checkbox" name="test[]" value="3">


If all checkbox are checked, it will return an array as follow array("1","2","3").
...
You can then add some js to handle the incoming data.

Hope this helps


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
July 13, 2009, 03:30 PM
Tony A
awendt,

No one is setting themselves up to sound smarter than anyone else, I just think that if you are expected to create launch pages in your job, a little HMTL training or understanding should be paramount.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
July 17, 2009, 11:37 AM
Kerry
Hi awendt,

Please refer to the earlier topic regarding being professional and positive on this board.

Thanks for everyone's help on this issue.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.