Jump to content

Cascading dropdown from non-editable parent field?


Recommended Posts

Hi, it seems that the only way to make a field available as a PARENT FIELD for a cascading dropdown, is to make that field editable; otherwise, that field is not an option.

I need to filter a dropdown according to a field that I can't allow to be edited. This is what I need on a Bulk Edit on a report:

  • field type: cascading dropdown
  • filter by: parent field
  • parent field type: display only

Has anyone run into this before? Any ideas? Thanks

Link to comment
Share on other sites

I have experienced this problem before. The field (as you pointed out) needs to be editable for CB to be able to work with the field. The work around I used was to make the field editable, then hide it from displaying.

Put the parent field you would like to be hidden between two HTML Blocks.
Then in the first HTML Block insert <table style="display:none;">
then close the HTML table tag in the following HTML block </table>.
This allows CB to perform operations on the parent field and hides it from displaying on the datapage.

Link to comment
Share on other sites

  • 5 years later...
On 7/26/2016 at 4:04 PM, JEllington said:

I have experienced this problem before. The field (as you pointed out) needs to be editable for CB to be able to work with the field. The work around I used was to make the field editable, then hide it from displaying.

Put the parent field you would like to be hidden between two HTML Blocks.
Then in the first HTML Block insert <table style="display:none;">
then close the HTML table tag in the following HTML block </table>.
This allows CB to perform operations on the parent field and hides it from displaying on the datapage.

 

Alternately, if you want to show the parent field as "Display Only",  but the DataPage doesn't permit using the Virtual Field element (Bulk Edit configuration, etc), set the field to "Text Field" and add the following code to the Footer of the Page (Bulk Edit Configuration):

<script>

if(typeof parentDisplayOnlyElement  === "undefined"){
     let parentDisplayOnlyElement = document.querySelector('input[name="BulkEditProductCategory"]'); // Select the input in the element you want to be just displayed
     parentDisplayOnlyElement.disabled = true;
     parentDisplayOnlyElement.style.border = 'none';
}

</script>

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...