[Solved] Easy way to indicate non-Parkable fields on a Form?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

[Solved] Easy way to indicate non-Parkable fields on a Form?

Post by Jaymer »

TLDR; Use a Presentation Rule to gray the field, and use a RenderScript to set tabindex=-1. The field is already set to Calculated, so you can't change it.

here's a simple form with 9 fields - but the circled ones are calculated fields.
Screen Shot 2020-01-05 at 1.24.56 AM.png
Screen Shot 2020-01-05 at 1.24.56 AM.png (55.96 KiB) Viewed 5177 times
If you drop these fields on the form, then you realize that Aware allows the cursor to just tab thru all 9 fields, what are you to do?
And the user doesn't get any feedback that a field is "Calculated" in the above form, so he can type into the field and nothing happens. Not intuitive as to whats happening.

In reality, you'd need to change the 5 cells to HTML cells, and re-type the field <<Contract.TotalPaid>>.
Thats not "real hard", more annoying. The last field is done this way. (and ultimately is a Fail due to a bug - see next post)

Is that what most of you would do?
I'm thinking an easy STYLE change would color the field blue so it didn't stand out.
And also code could set the Tabstop to 0.
Thats almost more work than just editing the cells.
Of course, to do HTML cells you have to actually use columns (and sometimes the Form designer breaks/is annoying when you have columns).

Whats your solution?
Last edited by Jaymer on Wed Jan 08, 2020 3:37 pm, edited 2 times in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there an easy way to make non-Parkable fields on a Fo

Post by Jaymer »

well, adding this to the field "Script" property did nothing: markup.attr("tabindex", 0) or markup.attr("tabindex", -1). Cursor still stops on the fields.
(per this thread)

And, I forgot I turned this in as a bug long ago. That last field won't display correctly. An HTML cell messes up because I have the "Label Above" on the cell.
You can see the error:
Screen Shot 2020-01-05 at 1.43.55 AM.png
Screen Shot 2020-01-05 at 1.43.55 AM.png (10.27 KiB) Viewed 5174 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there an easy way to make non-Parkable fields on a Fo

Post by Jaymer »

UPDATE

You can see here, I found an easy way to color the fields to give some indication to the user that these fields are different.
An example of this is seen in the CRM, Customer Mobile Edit form.
For some reason, they decided to color Mandatory Fields YELLOW (even though they already have a RED * )

So, on the Form, I added a simple Presentation STYLE rule, and set the background color.
After doing that a few times, it makes more sense to set that as a CLASS, so all of these fields can be changed App-wide with just an edit to the CSS file.
Having trouble doing this, so I made a post about that issue.

So,
1) we CAN give a visual indication that the field is calculated,
2) We CANNOT yet set the tab order to -1 to prevent tabbing into [now solved]
Attachments
Screen Shot 2020-01-06 at 2.55.57 AM.png
Screen Shot 2020-01-06 at 2.55.57 AM.png (26.68 KiB) Viewed 5149 times
Last edited by Jaymer on Wed Jan 08, 2020 3:37 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: Is there an easy way to make non-Parkable fields on a Fo

Post by Jhstephenson »

Jaymer, could they be put on the form as HTML?
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there an easy way to make non-Parkable fields on a Fo

Post by Jaymer »

jim
the 1st 2 posts in this thread talk about an "html" option - no joy
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there an easy way to make non-Parkable fields on a Fo

Post by Jaymer »

thanks to @idpsteve, he submitted this code.
works great in achieving the desired "-1" into tabindex.

this code is for the picture in the OP:

Code: Select all

$("input[id*='zTotalPaid']").attr('tabindex','-1');
$("input[id*='zTotalInvoiced']").attr('tabindex','-1');
$("input[id*='TotalAmount']").attr('tabindex','-1');
$("input[id*='fDolRemain']").attr('tabindex','-1');
$("input[id*='fLastBillDate']").attr('tabindex','-1');
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply