eForm section navigation buttons

Comments

3 comments

  • Avatar
    Scott Bennett

    So this is quite lengthy but I have one form with many tabs, I have since converted the tabs to separate processes but this does what you require. Also there is a section of JS here that recognizes that one of the functions has 2 tabs and next and previous will alternate between those 2 tabs. I did find that with to many tabs that application became heavy and slow to load which is why I converted to spawning off new processes instead of navigating between many tabs (FYI).

    So the buttons that you add will call the JS function 'navigate(secname)':

     

    eFormEvents.onFormLoadComplete=function()
    {navigate('Paleo Home Page');
    console.log("Form load complete event finished");
    };

    function sectionNavigate(sectionName)
    {
    var options = {};
    options.sectionName=sectionName;

    console.log("sectionNavigate: ",sectionName);

    eFormHelper.navigateToSection(options, function (myResult) {
    if (myResult.isSuccess) {
    }
    else {
    console.log(myResult.error);
    }
    });
    }
    function navigate(secName)
    {
    eFormHelper.showLoader({value : true},function(res){ });
    sectionNavigate(secName);
    console.log("Navigated to section: ",secName);
    if(secName==='Find Locality')
    {
    $('#sectionTabs div[name="Find Locality"]').show();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "none");
    $("input.save.popActionButtons").css("display", "none");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"FDL");
    }
    else if(secName==='Enter New Locality')
    {
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').show();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "none");
    $("input.save.popActionButtons").css("display", "none");
    $("input.cancel.popActionButtons").css("display", "");
    triggerLookup("CreateLocalityNumber");
    setMandatory('ENLAreyouaconsultant',true);
    setMandatory('ENLLocalityNumber',true);
    setMandatory('ENLEarliestAgeDrpDwn',true);
    setMandatory('ENLLatestAge',true);
    setMandatory('ENLAreyouaconsultant',true);
    setMandatory('ENLLandStatusDrpDwn',true);
    setMandatory('ENLHorizontalPositionSource',true);
    setMandatory('ENLLocalityPrecision',true);
    setMandatory('ENLGeologicFormation',true);
    setMandatory('ENLDateDiscovered',true);
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"ENL");
    }
    else if(secName==='Enter Visit')
    {
    setMandatory('ENLAreyouaconsultant',true);
    setMandatory('ENLLandStatusDrpDwn',true);
    setMandatory('ENLHorizontalPositionSource',true);
    setMandatory('ENLLocalityPrecision',true);
    setMandatory('ENLGeologicFormation',true);
    setMandatory('ENLDateDiscovered',true);
    setMandatory('EVSAction',true);
    setMandatory('EVSSignificamce',true);
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').show();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"ENV");
    }
    else if(secName==='Paleo Home Page')
    {
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').show();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "none");
    $("input.save.popActionButtons").css("display", "none");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"PHP");
    }
    else if(secName==='User Status')
    {
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').show();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "");
    $("input.submit.popActionButtons").css("display", "none");
    $("input.save.popActionButtons").css("display", "none");
    $("input.cancel.popActionButtons").css("display", "");
    triggerLookup("SHPAffiliationLookup");
    triggerLookup("SHPUserRoleLkUp");
    triggerLookup("SHPRepositoryLookup");
    triggerLookup("SHPSavedApplicationsLkUp");
    triggerLookup("SHPSubmittedApplicationLkup");
    triggerLookup("SHPRgnPalLookup");
    triggerLookup("SHPDSDRgnLookup");
    triggerLookup("SHPSOPLgnLookup");
    triggerLookup("FPCFOLookup");
    triggerLookup("USAPLookup");
    setValue('SHPSelPage',"URS");
    }
    else if(secName==='Create User Affiliation')
    {
    setMandatory('PCIAffiliation',true);
    setMandatory('AddressLine1',true);
    setMandatory('City',true);
    setMandatory('State',true);
    setMandatory('PostalCode',true);
    setMandatory('PhoneNumber',true);
    setMandatory('PhoneType',true);
    setMandatory('Email',true);
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').show();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"CUA");
    }
    else if(secName==='Edit User Information')
    {
    setMandatory('EdAddressLine1',true);
    setMandatory('EdCity',true);
    setMandatory('EdState',true);
    setMandatory('EdPostalCode',true);
    setMandatory('EdPhone',true);
    setMandatory('EdPhoneType',true);
    setMandatory('EdEmail',true);
    setMandatory('EdUserChooseAffiliation',true);
    $('#sectionTabs div[name="Edit User Information"]').show();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"EUI");
    }
    else if(secName==='Create Permit Application')
    {
    setMandatory('CreApApplicationName',true);
    setMandatory('ApplicationStartDate',true);
    setMandatory('ApplicationEndDate',true);
    setMandatory('CreApChooseAffiliation',true);
    setMandatory('SelectStatewhereworkwillbeperformed',true);
    setMandatory('RepositorySelection/ChooseRepository',true);
    setMandatory('CreApChooseAreaofInterest/AOIUserLocationName',true);
    setMandatory('CreApChooseAreaofInterest/CreApCollectionType',true);
    setMandatory('Checkthisboxifyouunderstandyourresponsibilities',true);
    $('#sectionTabs div[name="Create Permit Application"]').show();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"CPA");
    console.log("Successfully navigated to CPA");
    }
    else if(secName==='Upload New User Files')
    {
    $('#sectionTabs div[name="Upload New User Files"]').show();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "none");
    $("input.cancel.popActionButtons").css("display", "");
    triggerLookup("NUFUserNameTrim");
    setValue('SHPSelPage',"NUF");
    }
    else if(secName==='Application Approval')
    {
    $('#sectionTabs div[name="Application Approval"]').show();
    $('#sectionTabs div[name="Permit Parse"]').show();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    triggerLookup("PPLocationInformation/PLSSparseLookup");
    setMandatory('AppApSelectApplication',true);
    setMandatory('PPLocationInformation/PPPermitName',true);
    loadPermitParseMaps();
    setValue('SHPSelPage',"AA");
    }
    else if(secName==='User Role')
    {
    setMandatory('CURAddorRemove',true);
    $('#sectionTabs div[name="User Role"]').show();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "none");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"UUR");
    }
    else if(secName==='Permit Approval')
    {
    $('#sectionTabs div[name="Permit Approval"]').show();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Application Approval"]').hide();
    $('#sectionTabs div[name="Permit Parse"]').hide();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setMandatory('PASelectPermittoProcess',true);
    setMandatory('PAApprovalType',true);
    setMandatory('PAPermitNumber',true);
    setValue('SHPSelPage',"PA");
    }
    eFormHelper.showLoader({value : false},function(res){ });
    /*$('#sectionTabs div[name="Application Approval"]').show();
    $('#sectionTabs div[name="Permit Parse"]').show();
    $('#sectionTabs div[name="Add or Delete Participants"]').show();
    $('#sectionTabs div[name="Add or Delete Repositories"]').show();
    $('#sectionTabs div[name="Upload New User Files"]').show();
    $('#sectionTabs div[name="Create Permit Application"]').show();
    $('#sectionTabs div[name="Edit User Information"]').show();
    $('#sectionTabs div[name="Find Locality"]').show();
    $('#sectionTabs div[name="Enter Visit"]').show();
    $('#sectionTabs div[name="Enter New Locality"]').show();
    $('#sectionTabs div[name="Paleo Home Page"]').show();
    $('#sectionTabs div[name="User Status"]').show();
    $('#sectionTabs div[name="Create User Affiliation"]').show();*/
    };

    eFormEvents.onSectionNavigation = function (args)
    {
    console.log("Entered Section Navigation");

    // console.log("Args: ", args,'\n');

    var control = getfieldValue('SHPSelPage');
    console.log("On page: ", control,'\n');

    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "none");
    $("input.save.popActionButtons").css("display", "none");
    $("input.cancel.popActionButtons").css("display", "");

    if (control === 'PP')
    {
    $('#sectionTabs div[name="Application Approval"]').show();
    $('#sectionTabs div[name="Permit Parse"]').show();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"AA");
    console.log("Went to page Application Approval ");
    }
    else if(control==='AA')
    {
    $('#sectionTabs div[name="Application Approval"]').show();
    $('#sectionTabs div[name="Permit Parse"]').show();
    $('#sectionTabs div[name="Add or Delete Participants"]').hide();
    $('#sectionTabs div[name="Add or Delete Repositories"]').hide();
    $('#sectionTabs div[name="Upload New User Files"]').hide();
    $('#sectionTabs div[name="Create Permit Application"]').hide();
    $('#sectionTabs div[name="Edit User Information"]').hide();
    $('#sectionTabs div[name="Find Locality"]').hide();
    $('#sectionTabs div[name="Enter Visit"]').hide();
    $('#sectionTabs div[name="Enter New Locality"]').hide();
    $('#sectionTabs div[name="Paleo Home Page"]').hide();
    $('#sectionTabs div[name="User Status"]').hide();
    $('#sectionTabs div[name="Create User Affiliation"]').hide();
    $('#sectionTabs div[name="User Role"]').hide();
    $('#sectionTabs div[name="Permit Approval"]').hide();
    $("input.next.popActionButtons").css("display", "none");
    $("input.previous.popActionButtons").css("display", "none");
    $("input.submit.popActionButtons").css("display", "");
    $("input.save.popActionButtons").css("display", "");
    $("input.cancel.popActionButtons").css("display", "");
    setValue('SHPSelPage',"PP");
    console.log("Went to page Permit Parse ");
    };

    // console.log("Left Section Navigation");
    };

    function setValue(fieldId, data)
    {
    // console.log("Start setValue");
    var options = {};
    options.fieldId=fieldId;
    options.value=data;
    // console.log("fieldId: ",fieldId);
    // console.log("data: ",data);

    eFormHelper.setFieldValue(options, function (result) {
    if (result.isSuccess) {
    // console.log(result.data); //logs the data holds empty object
    }
    else {
    console.log(result.error); //logs the error
    }
    });
    // console.log("End setValue");
    }

    function getfieldValue(controlID)
    {
    var options = {};
    options.fieldId = controlID;
    console.log("Enter Get Field Value");

    // individual control
    // (or) options.fieldId = 'Subform1/TextBox1'; //search in all rows in a subform
    // (or) options.fieldId = 'Subform1/TextBox1: [*]'; //search in all rows in a subform
    // (or) options.fieldId = 'Subform1/TextBox1: [rowindex]'; // search in specific row in a subform
    //
    eFormHelper.getFieldValue (options, function (result)
    {
    if (result.isSuccess) //check if is success
    {
    console.log(result.data); //data holds the found control's value
    control = result.data;
    }
    else
    {
    console.log(result.error); //logs the error
    }
    });
    return control;
    }

    1
    Comment actions Permalink
  • Avatar
    SRL Support Team

    Thanks a lot!

    I'll check this script on my side.

    Regards,

    Marina

    0
    Comment actions Permalink
  • Avatar
    Leandro de Oliveira Fernandes

    Thanks so much Scott.

    0
    Comment actions Permalink

Please sign in to leave a comment.