For the wisdom of the crowd: I have an Account page viewable by the client, with Table A and Table B. I only want one table viewable at a time.
So I created a multi-choice dropdown field called “Toggle” with those two options, “Table A” and “Table B.”
I added a form view to the page with just that Toggle field, and I have set up page rules that say if “Table A” is selected in the Toggle field, hide Table B. Likewise, if “Table B” is selected, hide Table A. And it works!
But the user still has to hit the Submit button to make the change. No biggee… but is there a JS or KTL option that would allow the form to be submitted and the page refreshed without hitting the Submit button, and instead it would be activated when the Toggle option is changed?
Just wondering if I can remove all the hard work of… clicking a button.
try having a details view instead of a form, with two action links. One switches the toggle to ‘Show Table A’ and the other as ‘Show Table B’. And one is hidden at any time depending on the current toggle setting. And for each link get it to refresh the page using the ‘redirect to a url’ setting and javascript:location.reload(true) as the url.
Almost there, I think - so i have set up the action links as described to change the Toggle field, and the page rules hide the unselected tables. So far so good.
That JS entry (javascript:location.reload(true)) appears to refresh the Toggle details view itself (very useful!), but not the page. So the selected table only appears when the page is refreshed and the page rules process.
An update: interestingly, the rest of the page appears to reload. You can see other graphs on the page repopulate. But the hide/show rules don’t process unless I hit Refresh at the top of the page. I’ll keep chasing it…