Hello,
I'm a .Net Developer coming into Laserfiche as a complete newbie looking to modify an already existing issue in a Laserfiche form.
The form contains a single line (id = q1) and based upon the value entered in this single line it selects that value (via lookup rule) within a dropdown list (id = q2) that is populated from a data source.
Before an entry is input in q1, q2 behaves as intended. The form opens with q2 being populated via the data source. I can select an entry, clear it and the data source is maintained to select other entries.
As soon as I enter a value in q1 that serves at the lookup for the dropdown (q2), the dropdown is updated with only the value from the q1. When I clear the dropdown of its q1 value, the dropdown is empty.
I need to be able to repopulate the dropdown (q2) with the original data source if the equivalent value from q1 is cleared within the dropdown (q2) - yet keep the value entered in q1.
This can be acheived fairly simply in a asp.net page due to written logic and taking advantage of the change event in the postback.
I need to somehow mimick that either revising the lookup rule and/or via css & javascript.
Does anyone have any suggestions or can you please point me in the right direction?
Function to apply the select2 follows:
function ApplySelect2() {
$.getScript(' ', function () {
$('.q2 select').select2({
width: "450px",
placeholder: "Select an employee",
allowClear: true
});
});
}
Thank you in advance for your assistance.