By: TomH
Date: 2013-08-20
Time: 06:20
|
ope=html;select='consult_type[]' not selecting of val contains &Hello
Stumbled across this anomoly - I hope someone has seen this behavior and can help. When attempting to check checkboxes -- none are checked that have a valus that contains an "&" (that comes from the dataabase The mysql data come from a SET('Acoustical','ADA Compliance','Architectural Illustrators / Rendering','Art Consultants','Artists','Audio/Visual/Acoustics','Code Consultants','Commissioning','Web Design & Development','Furniture Repair & Refinishing','Drapery Fabrication','Recyclers') field To get the values for creating and checking the checkboxes the PHP. is...
The template
The array of data from the database, for use by the ope=html; select, looks like this...
In the rendered page ONLY the "Food Service" checkbox is checked The html (page source) that is generated from the same database SET() field renders the "&" correctly Any one have any ideas about the source of the problem and any possible fix? Thanks for TBS every day, TomH |
|||
By: Sarah Kemp
Date: 2013-08-20
Time: 17:10
|
Re: ope=html;select='consult_type[]' not selecting of val contains &If the problem is the ampersand, have you tried html encoding it? It is not standard to use a bare '&' in HTML, you should be using '&'. Could try: http://php.net/manual/en/function.htmlspecialchars.php
Where is your logic for checking the checkbox? I don't see any reference in the code you provided. Are you seeing all of your checkboxes display properly with their description, and the only thing wrong in the lack of check mark? |
|||
By: TomH
Date: 2013-08-25
Time: 01:16
|
Re: ope=html;select='consult_type[]' not selecting of val contains &Sarah
About checking the boxes = in the above there's the php
In the displayed page, for the checkboxes... the "value" is displayed correctly for all of the vals that include the ampersand but when there's a "contact_type_values" that includes an ampersand (correctly) ... the box is not checked |
|||
By: Skrol29
Date: 2013-08-25
Time: 23:11
|
Re: ope=html;select='consult_type[]' not selecting of val contains &Hi,
Despite the value is correctly displayed by the brother, the HTML standard expects that ampersands (&) are specail characters that should be coded with '&' in attributes. Nevertheless, I think your problem is not due to the standard. TBS does protects this special char by default. That is: any merged value is converted into correct HTML by replacing special chars such as '&'. If you specify "htmlconv=no" then there is no replacement. Thus, in the merged values '&' is replaced with '&', while in the fields that select items ([onshow.contact_type_values;htmlconv=no;ope=html;select='consult_type[]']) '&' is not replaced. So it doesn't match. |
|||
By: Anonymous
Date: 2013-08-29
Time: 00:34
|
Re: ope=html;select='consult_type[]' not selecting of val contains &Skrol29
That makes sense good -- thanks very much for making it understood I will try it without the htmlconv=no in the ope=html field Thanks for TBS every day, TomH |