H, How can I control the visibility of a group on the main page based on the value of a partial page control.
Logically, I need to write the value of the partial page control back to the main page to allow me to interogate it, I just cant get it to work.
I'm assuming I need to bind an editable control on the main page to one on the partial page but the only way I've got this to work (albeit unusually) is in an isolated project.
In my isolated project I have an edit on the main page and an edit & select on the partial page, the two edits are bound on submission to the partial page and the partial page edit is updated by the select.onchange. What I'm seeing is only the main page edit box showing the new value of the selectbox (I would expect both to show the new value) which makes me thing this is working by accident rather than design.
Am I approaching this correctly? How would one normally do this?
Logically, I need to write the value of the partial page control back to the main page to allow me to interogate it, I just cant get it to work.
I'm assuming I need to bind an editable control on the main page to one on the partial page but the only way I've got this to work (albeit unusually) is in an isolated project.
In my isolated project I have an edit on the main page and an edit & select on the partial page, the two edits are bound on submission to the partial page and the partial page edit is updated by the select.onchange. What I'm seeing is only the main page edit box showing the new value of the selectbox (I would expect both to show the new value) which makes me thing this is working by accident rather than design.
Am I approaching this correctly? How would one normally do this?
RE: Hide If based on partial page value
Your main page will not 'refresh' in the scenario where you are invoking the partial page, which means any settings to control the group visibility on the main page will not achieve your desired effect.
Your event trigger for the visibility needs to be in the partial page and I think you already have this implemented correctly based on your text. If you are using v4 then you can use the Events tab to control Group Visibility. But, I assume you are using v3.1.2?
In this case, the best approach is to use a simple piece of Javascript, triggered from the onchange event on the partial page and then use something similar to the hideComponent, showComponent or toggleComponent functions to control the visibility of your group on the main page.
You can locate the documentation for these functions using the following URL:
http://www.hyfinity.net/mvcdocumentation/MVC/FormMaker%20User%20Guide/Custom%20Script%20Processing%20and%20APIs.html
Kind Regards
Abdul
RE: Hide If based on partial page value
There is a simple javascript API which I have been using to control a visibility of a group dynamically.
//Hide
hyf.util.toggleComponent(layoutID, "hide");
//show
hyf.util.toggleComponent(layoutID, "show");
layoutID is the ID of the layout group. You can put show/hide a group in the main page by using the javascript API in your script in the partial page.
Taeho.BPM
RE: Hide If based on partial page value