I am using the below code to populate inline insert fields to make data entry easier for users (got it from a post by @DefinitelyNot31337). I am having some problems on one page though and hoping somebody can help clear it up.
My search and results are on one page. The search is using 2 fields (SolutionID and ProductID) both go to Parameters of the same name ([@SolutionID and [@ProductID]). There is a third field (FeatureID) which is a Cascading Drop Down based on the ProductID.
As soon as I make FeatureID a Cascading Drop Down, it fails. If I leave it as a regular drop down, the code works perfectly. Code below
<script>// Replace [@authfield:name] accordingly with the parameter or custom value you wish.var paramValue ='[@SolutionID]';// Replace with the name of your field as described in your DataSourcevar field_name ='SolutionID';/* Edits are not necessary for this part */var i_field = document.querySelector('form[action*="[@cbAppKey]"] #InlineAdd'+ field_name);
i_field.value = paramValue;/* To this part*///i_field.type = 'hidden'; // If you wish to hide the field as well, just remove the two forward slashes before i_field.type
i_field.readOnly =true;// Replace [@authfield:name] accordingly with the parameter or custom value you wish.var paramValue ='[@ProductID]';// Replace with the name of your field as described in your DataSourcevar field_name ='ProductID';/* Edits are not necessary for this part */var i_field = document.querySelector('form[action*="[@cbAppKey]"] #InlineAdd'+ field_name);
i_field.value = paramValue;/* To this part*///i_field.type = 'hidden'; // If you wish to hide the field as well, just remove the two forward slashes before i_field.type
i_field.readOnly =true;</script>
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
NickO
I am using the below code to populate inline insert fields to make data entry easier for users (got it from a post by @DefinitelyNot31337). I am having some problems on one page though and hoping somebody can help clear it up.
My search and results are on one page. The search is using 2 fields (SolutionID and ProductID) both go to Parameters of the same name ([@SolutionID and [@ProductID]). There is a third field (FeatureID) which is a Cascading Drop Down based on the ProductID.
As soon as I make FeatureID a Cascading Drop Down, it fails. If I leave it as a regular drop down, the code works perfectly. Code below
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.