Conditionally display icon image in Custom Form

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Conditionally display icon image in Custom Form

Post by customaware »

I have created a Custom Form which has a link called Select on it.

If the user Clicks it I want to display a Green Tick icon next to it.

Can anyone suggest the best way to conditionally display the icon.

I can get a process to set an Attribute to Yes or No via a process when the user clicks the Select button but how can I then display the image?

This Custom Form is html/css template, not a Presentation.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Post by Rennur »

Best way is to do this with CSS.

Step 1

Download FontAwesome (260Kb).
Unzip all to C:\AwareIM\Tomcat\webapps\AwareIM\FontAwesome\
In Startup.html, add

Code: Select all

<link rel="stylesheet" type="text/css" href="FontAwesome/css/font-awesome.css">
under the <!-- CSS Separator line -->

Step 2

In your BO, go yo Yes/No attribute > Presentation > Tick 'Save form when checkbox ticked or unticked'

On your custom form, this is your buton (Change the process names in the code below):

Code: Select all

<<IF BO.myYN<>'Yes' THEN SHOW SECTION START>> 
    <a href="javascript: void(0);" onClick="AwareApp.startProcessFromForm ('myProcessToTickYes','main', this, false)"><i class="fa fa-square-o">&nbsp;</i> Select</a>
<<SECTION_END>>
<<IF BO.myYN='Yes' THEN SHOW SECTION START>> 
    <a href="javascript: void(0);" onClick="AwareApp.startProcessFromForm ('myProcessToTickNo','main', this, false)"><i class="fa fa-check-square-o" style="color:#228B22; !Important">&nbsp;</i> Selected</a>
<<SECTION_END>>
Place the processes in the form's Auto-Refresh.

Hope this works for you.

Cheers
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Post by customaware »

Nice Rennur.

Gorgeous icons.

Thanx.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Post by Rennur »

No probs, got it working?
Post Reply