Visible field based on month
I have a club membership form I created. I want to allow a discount of 10% if it is the months of April to October,
I've implemented a field that performs this calculation (currently visible and active in the stream of calculation below). I want this field disappears from the view of the user and this calculation go dormant from 1 November to 31 March or the months of November to March.
I've been using FormCalc. Any ideas?
Gordon
You can try the following code in the Initialize event...
If (Num2Date (date ("M")) > 3 and Num2Date (Date ("M")))<11)>11)>
Write the code for APR - Oct period
DiscountField.presence = "visible";
on the other
Write code for the time of Nov - Mar
DiscountField.presence = 'hidden ';
endif
Similarly, you can use the same if condition in the calculation for the discount code...
Thank you
Srini
Tags: Adobe LiveCycle
Similar Questions
-
Hide/show the fields based on textbox
I wonder if there is a way to hide certain fields based on the question of if a user enters a value in a text box and then reappear if the value in the text box is removed and the field becomes white.
I have two scenarios where I would this happen
1. I have a "Non-registered" check box and a text field 'blood pressure '. If the user check mark the box "Not registered", the field of blood pressure is hidden (I managed this already). If the user unclicks the box, the field of blood pressure again (even once, I did already). Otherwise, if the user enters a value in the 'pressure' I would 'Unregistered' area to disappear. I got this as well with this code: (placed in the form of javascript Action, mouse upward, event)
this.getField("Not_Recorded").display = event.target.value = "Off"? Display.visible: display.hidden;
I don't know if it's the appropriate script that I use, but he did not hide the field "unregistered". The problem is, I would 'not registered' to hide if a value is entered in the field of blood pressure and reappear if this value is then removed (i.e., the user changes his mind or made a mistake and wants to not click saved instead). I don't know if it's feasible or just way too complicated for me to do.
2. in the second scenario, I have 2 text fields where the user must enter a value for weight in pounds or kilograms. There is a text box for a value of lbs and a text box for a value in kg. If the user enters a value for books, I'd like to field for kgs be hidden, but still, if they delete this value so that the lbs field becomes empty, I would field for kgs reappear.
is this feasible or is there another way I might be able to do this?
For the first, I would not hide the check box for the reason you give. In addition to hide the text field, it must reset it so that any value that the user may have entered is not retained when it is hidden.
If you really want to show/hide the check box depending on whether there is an entry in the text field, you can use the validation script customized for the text field:
var f is getField ("unregistered");.
If (! event.value) {}
f.Display = display.visible;
} else {}
f.Value = "Off";
f.Display = display.hidden;
}
For this script start working, you change the value in the text field.
For the second problem, what I do, is to have a single text field and two boxes to tick to indicate lbs or kg. If you want to stay with the configuration you have, you can clear the other text field with a custom validation script:
Script for weight_lbs custom validate field
If (event.value) getField("weight_kgs").value = "";
Do the same for the other text field, but change the domain name in the script. This will allow only one field to be filled at the same time and do not bother with the masking.
-
How to calculate the sum of two digital form fields based on the selection of the checkbox.
I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B
_ Field - 2
_ Field - A 4
[check] _ _ field - 6 C
[disabled] _ _ field - 2 C
Thank you
The custom field C calculation script could be:
(function () { // Get the values of the text fields, as numbers var v1 = +getField("A").value; var v2 = +getField("B").value; // Set this field's value based on the state of the check box named "CB" if (getField("CB").value !== "Off") { event.value = v1 + v2; } else { event.value = v1; } })();
Replace 'A', 'B', and 'CB' with the real names of the fields.
-
Show or hide form fields based on Department
Hello world
I have a large form with many fields on. I have a requirement to show/hide some of these fields, based on the Department of the user code. So a user of a particular Department would see a set of fields over only those relevant to their Department - all non-relevant fields for this Department need to be obscured.
My first thought was to define the conditional on each field and allows you to search if the field to be displayed by checking a department-field table in the SQL database. But it would mean a blow to the database for each field, that I need to check.
Can anyone think of a more elegant (and efficient) solution for this? I use Apex 4.2.
Hello
Permission to create and assign to the patterns.
Permission is normally performed only once per session.
Kind regards
Jari
-
In: toggle a field based on the State of a checkbox
Hi all
I have a tabular form on a single table. The table has a Y/N column type. So to see this checkbox column I followed excellent tutorial http://www.inside-oracle-apex.com/checkboxes-in-tabular-forms-the-easy-way/ Patrick
It works very well. But now I also want to turn another field based on the question of whether this check box is checked or not. To do this, I followed another post on how to do it and it also works. But the problem is when I try to save the form, I get the dreaded MRU error.
Tabular form fields
NAME, SALARY, ACTIVE
NAME-> Normal text box
SALARY-> I want this field to be enabled/disabled based on the value of the last column ENABLED_CHECKBOX
ENABLED_CHECKBOX-> it's a checkbox (created by following the tutorial of Patrick)
What I did to make SALARY toggle dynamically (it works, but I get error MRU registration)
Change ENABLED CHECKBOX_
ENABLED_CHECKBOX-> This is a standard report with the following HTML Expression field:
"< pre > < input type ="checkbox"#ENABLED_CHECKBOX # value =" "#ROWNUM #" name = "f40" id = "f40_ #ROWNUM # ' class = 'MyClass' / > < / pre >
Additional dynamic action
WHEN = change event
Selection type = jQuery Selector
JQuery Selector = .myClass
Condition = no requirement
Real Action = run Javascript
Code =
< pre >
column_2_id = "f02_000" + $(this.triggeringElement).attr('id').substr (4);
If (.attr ('checked')) $(this.triggeringElement)
{
$("#"_+_column_2_id).attr ("disabled", "disabled");
}
on the other
{
$("#"_+_column_2_id).attr ("disabled", false);
}
< / pre >Sylvie,
You must reactivate the fields before being submitted, because the disabled fields are not subject at all - and that throws what APEX collections uses tabular forms. See my post here.
Short version: use something like this as an action dynamic javascript before submitting the form:
$('input:disabled').attr('disabled',false);
-David
-
Auto-fill text box values field based on the selection of the menu drop-down
Try to fill in address, city, province, zip from text fields based on the selected option in a select form field. The following code works fine in Internet Explorer, but in Chrome or Firefox, after selection, text, the fields are filled with the word "undefined."I found a PHP script Jquery here version that would probabably do the trick.
http://StackOverflow.com/questions/3657127/jQuery-populate-text-input-from-table-based-on-select-Valeur
Maybe someone has a version of CF. they could share?Thanks in advance to anyone who can point me to a solution for this code, or a better way to fulfill my need.<!--> destinations with address auto-fill, city, etc.
< script type = "text/javascript" >
function selectAddress (list) {}
take the first element is empty
If (list.selectedIndex > 0) {}
var locationID = list.options [list.selectedIndex] .value;
locationAddress var = list.options [list.selectedIndex] .locationAddress;
var locationCity = list.options [list.selectedIndex] .locationCity;
var locationState = list.options [list.selectedIndex] .locationState;
var locationZip = list.options [list.selectedIndex] .locationZip;
document.getElementById('locationID').value = locationID;
document.getElementById('locationAddress').value = locationAddress;
document.getElementById('locationCity').value = locationCity;
document.getElementById('locationState').value = locationState;
document.getElementById('locationZip').value = locationZip;
}
}
< /script >
< b >
< td align = 'right' bgcolor = "#FFFFFF" valign = "top" > Destination name < table >
< td align = "left" bgcolor = "#FFFFFF" valign = "top" >
< select name = "locationID" onChange = "selectAddress (this)" class = "smallforms" > "
< option value = "" > SELECT the DESTINATION ››› < / option >
< cfoutput query = "allLocations" >
"" < option value = "" #locationName # "locationAddress =" #allLocations.locationAddress # "locationCity =" "#allLocations.locationCity #" locationState = "#allLocations.locationState #" locationZip = "#allLocations.locationZip #" > #locationName # < / option >
< / cfoutput >
< / select >
Others: cfinput name = "destinationNameOther" type = "text" class = "smallforms" size = "75" >
< br / >
< input id = "locationID" name = "locationID" type = "hidden" > < br >
Address: < input class = "smallforms" id = "locationAddress" name = "locationAddress" type = "text" size = "30" >
City: < input class = "smallforms" id = "locationCity" name = "locationCity" type = "text" size = "20" >
State: < input class = "smallforms" id = "locationState" name = "locationState" type = "text" size = "2" >
Postal code: < input class = "smallforms" id = "locationZip" name = "locationZip" type = "text" size = "8" > < br / >
< br / >
< table > < /tr >In your last code done selectAddress refers to "index" but I'm not declared or assigned. I think that you are missing 'var index = list.selectedIndex;' statement.
-
Make a mandatory DFF field based on another field
Hi all
We have a requirement where we need to do a mandatory DFF field based on another field.
example:
FDF has two fields:
Depose1: the values 'Email', 'Fax '.
Depose2
If "Email" is selected in 'Field1' Field2 should become mandatory.
All entries on this will be really useful.
Thank you and best regards,
Satya.Please see old topics that cover the same subject - http://forums.oracle.com/forums/search.jspa?threadID=&q=DFF+AND+mandatory+ANd+Dependant&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thank you
Hussein -
Show or hide fields based on a variable value
Hello
I am a beginner in the field of Acrobat. And my only question is:
How to shop around for a form field based on a value for the variable.
For example, if x = 1, I want to circle Japan and if x = 0, I want to leave without any modification.
Please help me. Thanks for your time and your help.
Thank you
Vijayvijay77.
Circling something is going to be more difficult than simply to specify the value of a field. What kind of API for manipulating PDF that you use to change the PDF file?
You might consider reviewing the document, if possible, you can use a checkbox or a radio button to indicate a selection, as opposed to circling a Word.
-
Make the text visible/invisible field based on the menu drop-down
I currently have a form that automatically calculates dates based on the value in particular the "Text10" field with the current script of
Custom calculate script for the field 'date '.
(function () {}
Get the date in the field
var v = getField("Text10").valueAsString;
Convert string to date
var d = util.scand ("mm/dd/yyyy", v);
Add 30 days
d.setDate (d.getDate () + 31);
Fill in this field with the result
If {(v)
Event.Value = util.printd ("mm/dd/yyyy", d);
} else {}
Event.Value = "";
}
})();
I want to thank this option to hide the field if one selects a particular value in a drop-down list. Allows to call the drop "decline.1" and values are just 'Yes' and «» Yes makes visible, hide it.
Is this possible? I looked through the forums and can't seem to find a solution. I use Adobe Acrobat X Pro
Thank you
Yes, it is possible. Just add the following line, this isn't little matter so long it after the first year and before the last:
Event.Target.Display = getField("drop1").value = 'no '? Display.Hidden: display.visible;
-
I have 17 text fields 'questions' and have hidden buttons for each I would appear once the administrator puts in a "password" at the bottom of the page.
For the "password", I created a text field to enter this password and a "Log In" button.
I want to be able to do is for the user to put in the 'password' and the 'Log In' button contains the script necessary to display these fields. 17 text fields show only one at a time, so I want the action of the 'Log In' button to show only the hidden buttons corresponding to the current visible areas.
Here is my code. What happens is little matter what I do, it says the password is incorrect and mask "publient1" which has never been specified in the code in a variable.
Initially, I had the first "else if" statement as the first "If" statement, but the results are the same in any event.
var res = this.getField("resolution"); var password = this.getField("password"); var res1 = this.getField("add-res1"); var res2 = this.getField("add-res2"); var res3 = this.getField("add-res3"); var res4 = this.getField("add-res4"); var res5 = this.getField("add-res5"); var res6 = this.getField("add-res6"); var res7 = this.getField("add-res7"); var res8 = this.getField("add-res8"); var res9 = this.getField("add-res9"); var res10 = this.getField("add-res10"); var res11 = this.getField("add-res11"); var res12 = this.getField("add-res12"); var res13 = this.getField("add-res13"); var res14 = this.getField("add-res14"); var res15 = this.getField("add-res15"); var res16 = this.getField("add-res16"); var res17 = this.getField("add-res17"); var issue1 = this.getField("issue1"); var issue2 = this.getField("issue2"); var issue3 = this.getField("issue3"); var issue4 = this.getField("issue4"); var issue5 = this.getField("issue5"); var issue6 = this.getField("issue6"); var issue7 = this.getField("issue7"); var issue8 = this.getField("issue8"); var issue9 = this.getField("issue9"); var issue10 = this.getField("issue10"); var issue11 = this.getField("issue11"); var issue12 = this.getField("issue12"); var issue13 = this.getField("issue13"); var issue14 = this.getField("issue14"); var issue15 = this.getField("issue15"); var issue16 = this.getField("issue16"); var issue17 = this.getField("issue17"); var iv1 = issue1.display = display.visible; var iv2 = issue2.display = display.visible; var iv3 = issue3.display = display.visible; var iv4 = issue4.display = display.visible; var iv5 = issue5.display = display.visible; var iv6 = issue6.display = display.visible; var iv7 = issue7.display = display.visible; var iv8 = issue8.display = display.visible; var iv9 = issue9.display = display.visible; var iv10 = issue10.display = display.visible; var iv11 = issue11.display = display.visible; var iv12 = issue12.display = display.visible; var iv13 = issue13.display = display.visible; var iv14 = issue14.display = display.visible; var iv15 = issue15.display = display.visible; var iv16 = issue16.display = display.visible; var iv17 = issue17.display = display.visible; var ih1 = issue1.display = display.hidden; var ih2 = issue2.display = display.hidden; var ih3 = issue3.display = display.hidden; var ih4 = issue4.display = display.hidden; var ih5 = issue5.display = display.hidden; var ih6 = issue6.display = display.hidden; var ih7 = issue7.display = display.hidden; var ih8 = issue8.display = display.hidden; var ih9 = issue9.display = display.hidden; var ih10 = issue10.display = display.hidden; var ih11 = issue11.display = display.hidden; var ih12 = issue12.display = display.hidden; var ih13 = issue13.display = display.hidden; var ih14 = issue14.display = display.hidden; var ih15 = issue15.display = display.hidden; var ih16 = issue16.display = display.hidden; var ih17 = issue17.display = display.hidden; if(password.value == "") { res.display = display.hidden; res1.display = display.hidden; res2.display = display.hidden; res3.display = display.hidden; res4.display = display.hidden; res5.display = display.hidden; res6.display = display.hidden; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && ih2 && ih3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.hidden; res3.display = display.hidden; res4.display = display.hidden; res5.display = display.hidden; res6.display = display.hidden; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && ih3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.hidden; res4.display = display.hidden; res5.display = display.hidden; res6.display = display.hidden; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.hidden; res5.display = display.hidden; res6.display = display.hidden; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.hidden; res6.display = display.hidden; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.hidden; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.noPrint; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && ih13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.noPrint; res12.display = display.noPrint; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && ih14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.noPrint; res12.display = display.noPrint; res13.display = display.noPrint; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && ih15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.noPrint; res12.display = display.noPrint; res13.display = display.noPrint; res14.display = display.noPrint; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && ih16 && ih17) { res.display = display.visible; res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.noPrint; res12.display = display.noPrint; res13.display = display.noPrint; res14.display = display.noPrint; res15.display = display.noPrint; res16.display = display.hidden; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && iv16 && ih17) { res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.noPrint; res12.display = display.noPrint; res13.display = display.noPrint; res14.display = display.noPrint; res15.display = display.noPrint; res16.display = display.noPrint; res17.display = display.hidden; } else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && iv16 && iv17) { res1.display = display.noPrint; res2.display = display.noPrint; res3.display = display.noPrint; res4.display = display.noPrint; res5.display = display.noPrint; res6.display = display.noPrint; res7.display = display.noPrint; res8.display = display.noPrint; res9.display = display.noPrint; res10.display = display.noPrint; res11.display = display.noPrint; res12.display = display.noPrint; res13.display = display.noPrint; res14.display = display.noPrint; res15.display = display.noPrint; res16.display = display.noPrint; res17.display = display.noPrint; } else { app.alert("The wrong password was entered. Please enter the correct password.") iv1; res1.display = display.hidden; res2.display = display.hidden; res3.display = display.hidden; res4.display = display.hidden; res5.display = display.hidden; res6.display = display.hidden; res7.display = display.hidden; res8.display = display.hidden; res9.display = display.hidden; res10.display = display.hidden; res11.display = display.hidden; res12.display = display.hidden; res13.display = display.hidden; res14.display = display.hidden; res15.display = display.hidden; res16.display = display.hidden; res17.display = display.hidden; }
These lines in your code does not make sense (and the rest of the code is dependent on them):
iv1 var = issue1.display = display.visible;
I think what you mean probably to do is the following:
iv1 var = (issue1.display == display.visible);
This sentence of yours shows a lack of understanding of the JS operators:
I also tried several operators equal sign for password.value, including a single equal sign, through three equal signs.
You should do some research and find out what the differences are between '=', 'is' and ' ='. '. They are essential to your code.
-
Visible from the field based on a value field
I have two fields A and B
For a field, there is a radio button Yes and no options
If I choose Yes field B needs to be visible
I have auto set to field submit property = true, to field B I added partial trigger has and visible = ' #{bindings. " An eq 'Yes'}
It does not always work at the level of the user interface
Any help please?This #{bindings. An eq 'Yes'} will return the index
try 0 to 1 instead of Yes and no
as this #{bindings. {A.inputValue-eq ' 1'}Published by: M.Jabr on March 11, 2011 12:03 AM
Published by: M.Jabr on March 11, 2011 12:05 AM
-
Show/hide fields based on T/F control - only showing or hiding, not both.
Hi Forum,
I'm looking to show/hide fields address based on a T/F control (or a single entry check box).
My online form has a number of business address fields, a T/F control and a number of postal address fields. I want the mailing address fields to hidden when a user clicks on the box 'As Above' (and demonstrated once again if they click this box once more).
I used the sample code (https://docs.oracle.com/cloud/latest/process_gs/CPRCW/GUID-F3BD3386-F333-45C6-AA56-C77136D169E5.htm) as a starting point for my Web form rule and it works as expected the first time that a user clicks area T/F (i.e. He's hiding the post fields) but it does not work the second time they until it clicks (where I assumed that fields would still be visible).
The T/F box has the following options:
true = as above
false = No
And my web rule looks like this:
If (AsAbove.value = true) {}
PostalAddress.visible = true;
PostalState.visible = true;
PostalPostCode.visible = true;
} else {}
PostalAddress.visible = false;
PostalState.visible = false;
PostalPostCode.visible = false;
}
I tried the same thing (with similar results) using a Checkbox control with a single option (according to the example code)
If (PostalAddressCheckbox [0] .value == 'As Above') {}
PostalAddress.visible = true;
PostalState.visible = true;
PostalPostCode.visible = true;
} else {}
PostalAddress.visible = false;
PostalState.visible = false;
PostalPostCode.visible = false;
}
As verified does not seem to be supported, is there another way to accomplish what I'm after, or I missed something somewhere simple (and y at - it documentation on the T/F control)?
See you soon,.
James.
Hello
Web Forms address these true-false as the boxes and, as such, in the form of tables.
You can see if you try to print the TrueFalse value. You should get something like java object lang @XXXXXX
Try to put the code as follows (in bold and underlined):
If (AsAbove[0].value = true """""") {}
PostalAddress.visible = true;
PostalState.visible = true;
PostalPostCode.visible = true;
} else {}
PostalAddress.visible = false;
PostalState.visible = false;
PostalPostCode.visible = false;
}
This should do the trick
See you soon
José
-
Filling of transient fields based on VO
I have a VO that stores the start date and duration (months). I need to have 2 transient fields.
One to view the end date, based on the start date and duration.
One is to display the status. If the current date is after the end date, display closed. Otherwise, displays Open.
For example. Start date = 16/12/2016, duration = 1. End date must be 16/01/2016 and the status is open.
There is an expression that I can use?
Hello
You can do this by using groovy.
But I will propose you to make class rowImpl of the viewObject and write your logic in the Get accessor of the temporary variable. There, you can use your java code to calculate and your don't need to write a grrovy...
Thank you
Aman J
-
show/hide fields based on the drop-down list of choices
I have a field from the drop-down list with three choices. Based on the selection, I need a specific text form field to appear and the others to stay hidden. (Or if it makes the code cleaner, the resulting field could be a drop-down list, too, with the selected choice.) I don't know Java well enough to extrapolate the code from the examples online and it fit my forms. I can provide an example of form. Thanks in advance for your help.
There are ways to run this. the easiest for you would be to add this script to the event (calculation of the Properties tab) to calculate the field that must be hidden. Take notes, all "/ /" is some tips for you to understand the code. You will need to put this script in all the areas you want to replicate the behavior, change the value depending on what you want to accomplish. the word 'event' means myself to make you understand.
If (this.getField("dropdown").value == 'put value here') {//replace "drop down" with the name of the drops}
Event.Target.Display = display.visible;
}
else {}
Event.Target.Display = display.hidden;
}
This works if you have a small amount of fields. If you manage to have a large number of similar fields, let me know because there are other, faster ways.
-
Make visible subform based on the dropdown value
I use this script successfully.
Form1. #subform [0]. typeOfIncidentDdl::change - (JavaScript, client)
assocInfoSubform.presence = 'hidden ';
custInfoSubform.presence = 'hidden ';If (xfa.event.newText == "associate injuries") {}
assocInfoSubform.presence = "visible";
} else {}
custInfoSubform.presence = "visible";
}But I would like to know how can I use numeric values in the object palette instead. For a drop-down list in the object > tab link, I click on the checkbox 'specify item values', where the values are, by default, the numbers, and the text is something I've specified in the tab field under "Items in the list." What is the syntax for the use of these numerical values instead of text? Here's what I tried without success.
If xfa.resolvNode(form1.#subform[0].typeOfIncidentDdl).value = "1"; {
[fields become visible and required with error messages]
} else {}
[fields are hidden and not required]
}And this:
var oSubform = xfa.resolveNode("form1.#subform[0].typeOfIncidentDdl.Value");
If (oSubform = 1); {etc.
And this:
var oSubform = xfa.resolveNode("form1.#subform[0].typeOfIncidentDdl.rawValue");
If (oSubform = 1); {etc.
I need to be close, but I don't quite have the correct syntax. Thank you for pointing me in the right direction.
Hello
Good man Jono, I cracked switch statements based on his examples
I suspect that this is part of the reverse lookup that explained Paul.
My understanding (now):
- xfa.event.newText is the new value, but it is not yet fully committed to the value of the drop-down list.
- With the help of this.boundItem (xfa.event.newText); you use this newly modified (but not yet posted) value and it controls against known display items.
- The switch statement then uses this display element, rather than the uncommitted newText.
I still think I have uses the event exit and rawValue, but "if it ain't broke, don't fix it!"
Good luck
Niall
Maybe you are looking for
-
I use Windows 7 Professional and have tried all the tips troubleshooting recommended for this problem. I don't have the new version of Firefox installed, because he had all kinds of problems, so I went back to the version that I had--I believe it's 3
-
Final Cut movie has perfect audio output but frozen video
I have a video of a concert of piano - I edited and synced audio sources. In the editing process, it looks great. However when sharing a video file (mov) result is a video with a couple of frames - and audio perfect. I tried different ways to expo
-
When I try to log on to my computer, I get Enter Password or Power Up password - those that I come to work and after a few attempts I get 96584802 off system error?
-
New HP Envy 4500 will not connect with my computer
New HP printer shows blue light of connection with my wireless network but the printer connects with my computer (Windows 7 64-bit) I tried troubleshooting with doctor without success. I thought about the restoration to the manufacturer's specificat
-
wireless network with windows vista problems
My laptop has windows vista edition family service pack 1. It does not connect to my router thomson TG585 v7 gateway. Ive tried everything nothing helped. I've heard this may be a compatibility problem with windows vista and there may be an available