#1 2016-06-11 21:30:45

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

How do I use a checkbox control value to determine html for a report?

I have four checkboxes that stand for 16x16, 32x32, 64x64 and 128x128

I have a report with HTML that loads in images to be chosen.

I use the height and width variables in the <img src> tag to define the graphics size.

I want to be able for the user to choose one (and only one) checkbox and then when the graphic is clicked, a second screen comes up (from the Report3 sample) and loads in the graphic.  It is there I would like the height and width to match the checked box.

I already have all this working EXCEPT for the checkbox to <img> tag height and width.

Here is the HTML I am using:

<center>
<p>
 <h2><strong>[reportBoxing.Record.Title]</strong></h2>
</p>
<br />
<p>
 <img height="32" width="32" ng-src="[reportBoxing.Record.ImageUrl]" />
 <br />
 <br />
 <h4><font face="verdana" color="red">LONG PRESS THE EMOJI AND CLICK 'SHARE' TO USE IN VARIOUS APPS</font></h4>
</p>
</center>

In other programming languages, I would define the variable and then have the <img> tag be

<img height=x width=y ng-src="[reportBoxing.Record.ImageUrl]" />

I also get that I would likely need an if/then statement somewhere.

If chkSizeBoxing16=1 then x="16"
If chkSizeBoxing32=1 then x="32"
If chkSizeBoxing64=1 then x="64"
If chkSizeBoxing128=1 then x="128"

I'm just not sure how to do this with app builder.

I also am not sure how to make sure the person ONLY checks one of the four choices.  I would have done a dropdown but I do not like how it was looking.

Thank you for your help.

Mike

Offline

#2 2016-06-11 21:51:34

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: How do I use a checkbox control value to determine html for a report?

Hello Mike,

Certainly we can use variables in the Reports (in fact you do it right now) something like the below one:

<img height="[MyHeightVar]" width="[MyWidthVar]" ng-src="[reportBoxing.Record.ImageUrl]" />

On the other hand, maybe the Checkboxes control are not the most addecuate when we want to let the user to choose one of some possible options. Are you tried with Radio controls or, maybe better, the Select control?

Offline

#3 2016-06-11 22:56:04

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: How do I use a checkbox control value to determine html for a report?

That worked perfectly with the select control.

I've got this app licked.

Mike

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.