Page 4 of 4

Access dynamic created Input Control that is selected by a user.

Posted: Fri Sep 13, 2013 3:01 pm
by Pete Nellmapius

Hi
I'm not the owner of the app. My colleague is.
We have shared it with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
The app is called Sante-Celeste. His Appery ID is "a href="mailto:christo@computersetcetera.co.za" rel="nofollow"christo@computersetcetera.co.za/a" Name Christo Du Preez
The form where the problem is is called "DiagnosticDoSelected"

------

How to get there:
Start Screen - Click "Bypass Login" button.
Next Screen - Click "*Diagnostics" button.
Next Screen - Click "Do Self Diagnostic Test" button.
"Select a Diagnosis" Screen no showing.
Select "Allergies"
Self Diagnosis Screen will open.

Scroll down Screen till Toggle buttons (2 of them):
1) Any signs of Anaphilactic Shock
2) Presence of Blood or Tar in vomit or stool
The 2 Toggles' parent is a Grid called "grid_AilmentSymptomsYN"

There is a grid below this Called "grid_YNAnswers" which contains in this case 2 labels:
1) EMERGENCY : Rush Patient to ER at nearest Hospital ASAP
2) Due to evidence of bleeding please Consult with a Physician as soon as possible!!!

When I toggle one of the Toggle's the JS: evaluateYNtoggle(this); is run
Javascrip file "DoDiagnostic"
PLease excuse allthe commented out stuff.
Line 116 to 133 is where the Appery("grid_YNAnswers").find("div").each(function(e) {....
is and line 135-137 is where I see the results.

I want to SHo or hide the labels as in lines 128-132

Problems are:
I don't get both lables and the Appery(this).hide(); or Appery(this).show() don't do anything.
I hope my explanation is clear.


Access dynamic created Input Control that is selected by a user.

Posted: Fri Sep 13, 2013 4:38 pm
by Kateryna Grynko

Hi Pete,

You use Grid component and map data to it. Programmatically you're creating a copy of the Grid. That is, you can't use such a select:
codeAppery("mobilecontainer1")/code
It's better to set a new CSS style for Grid, for example YNAnswer. Then you can use the following JavaScript code:
code$(".YNAnswer").find("div").each(function(e) {
if ($(this).attr("data-role") === "appery_label"){
$(this).hide();
}
});/code


Access dynamic created Input Control that is selected by a user.

Posted: Fri Sep 13, 2013 6:07 pm
by Pete Nellmapius

Thanks Katya
I'm about to go somewhere for the weekend. Will respond on Monday.


Access dynamic created Input Control that is selected by a user.

Posted: Fri Sep 13, 2013 6:09 pm
by Kateryna Grynko

Have a nice weekend!


Access dynamic created Input Control that is selected by a user.

Posted: Mon Sep 16, 2013 10:20 am
by Pete Nellmapius

Hi
The suggestion to set a new CSS style for Grid is something I have never done.
I'm reading up on how to do this. Is it possible you can point me to a good sample or tutorial on doing this.


Access dynamic created Input Control that is selected by a user.

Posted: Mon Sep 16, 2013 12:50 pm
by Kateryna Grynko

Hi Pete,

Sorry for the misunderstanding. We mean special class for a Grid. That is, there is a parameter Class name, not a separate set of Grid styles.


Access dynamic created Input Control that is selected by a user.

Posted: Tue Sep 17, 2013 6:52 am
by Pete Nellmapius

Thank you this is now working.