Hi
I want to have a field that appears/disappears if a yes/no is selected or not. - This is something I can do for a D365 form using either JavaScript or a Business Rule.
What is the equivalent functionality for use in the Portal?
Thanks
Lee
Hi
I want to have a field that appears/disappears if a yes/no is selected or not. - This is something I can do for a D365 form using either JavaScript or a Business Rule.
What is the equivalent functionality for use in the Portal?
Thanks
Lee
Hi Lee,
In regards to your concern, refer below link to set field visibility based on other field value change in portal:
https://www.agarwalritika.com/post/toggle-field-visibility-based-on-another-field-in-power-apps-portals
I hope it helps,
Thanks.
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365
Hi Lee,
I'm glad your problem has been solved, can you share your solution if possible?
Regards,
Leah Ju
Thanks Leah, but the issue isn't adding JavaScript, it's how to had an onclick to the form object.
Luckily I've been able to find this elsewhere now.
Thanks for replying everyone
Lee
Hi Lee,
Two ways you can add custom javascript to the portal.
1.Go Portal management app.
Navigate to entity forms to open one you need, and move to 'Additional Setting' tab, then you can add js code to 'Custom Javascript' section.
2.Edit portal by administrator.
You need login the portal with administrator, you will view pane in the top of the page.
you can open the page you need, then click 'Edit' button.
One dialog will open, you can add js ode under 'Options' tab.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Is there information anywhere as to how/where I would amend to the liquid in order to do this?
Yes, if that's your requirement, you can call the function from an onclick event.
Please mark the answer as verified if helpful.
Thanks
Do I need to add an onclick event to the form somehow? perhaps using liquid?
Hello Lee-Martin,
In your case, you want to have Client-Side logic to modify the visibility of a field, so you need to address that requirement using JavaScript (please check this official article).
function setFieldVisibility(fieldName, displayStatus) {
if (displayStatus == "show") {
$("#" + fieldName).closest("tr").show()
}
else if (displayStatus == "hide") {
$("#" + fieldName).closest("tr").hide()
}
}
setFieldVisibility("FieldName", "show")
setFieldVisibility("FieldName", "hide")
You can of course modify the function to fit your needs.
Refer also this post: https://community.dynamics.com/365/sales/f/dynamics-365-for-sales-forum/299169/show-or-hide-fields-on-entity-form-on-dynamics-365-portals
Hope that this helps you!
André Arnaud de Cal...
292,489
Super User 2025 Season 1
Martin Dráb
231,305
Most Valuable Professional
nmaenpaa
101,156