Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To add a delay timer as a rule under the rule editor #9

Open
omusleh opened this issue Nov 4, 2015 · 0 comments
Open

To add a delay timer as a rule under the rule editor #9

omusleh opened this issue Nov 4, 2015 · 0 comments

Comments

@omusleh
Copy link

omusleh commented Nov 4, 2015

I am facing an issue during filling one of the forms ,I am suggesting to add new rule in the rule in the "rule editor" that implements a delay of X seconds. more details about the scenario is below.

a JavaScript code is triggered when one of the field changes, on selection of value 2 or 1 , the showHideForEmployee is triggered and it overwrites the values filled by Autofill-Forms!

sample code:

github Employee github Employee ? No Yes

function showHideForEmployee()
{
if (currentSection == 'A'){
var isCompanyEmployee = getFieldValue(OUR_EMPLOYEE');
if(isCompanyEmployee == "1"){
fillRequestorInfo();
}else if(isCompanyEmployee == "2"){
makeReadOnlyFields(false);
}
}
}

function fillRequestorInfo()
document.getElementById('NAME').value = getFieldValue('FULL_NAME');
document.getElementById('ID').value = getFieldValue('EMP_ID');
makeReadOnlyFields(true);
}

function makeReadOnlyFields(flag){

if(flag){
    document.getElementById('NAME').readOnly = true;
    document.getElementById('ID').readOnly = true;
}else{
    document.getElementById('NAME').readOnly = false;
    document.getElementById('ID').readOnly = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant