I have a drop down with 2 options "Upload File", "Add URL". If user selects Upload file, my form will display a file selector. If user selects Add URL, the form will hide the file selector and instead display a textbox. I have done this using relevancy.
<xforms:bind nodeset="./document" relevant="instance('test')/uploadMethod='Upload File'"/>
<xforms:bind nodeset="./documentURL" relevant="instance('test')/uploadMethod='Add URL'" />
File Selector will add file information to document tag. Textbox data will get saved in documentURL tag.
User chooses to Upload File and uploads a file and saves the XML. In the saved XML, I no longer see the tag. I have a use case where user must be able to edit this XML and he can choose to Add URL. The issue is this. Because the saved XML does not contain the tag, the textbox does not get displayed on the form.
Could anybody please help with this? I need to be able to let the user see the file selecor or textbox based on what he chooses in the dropdown, in edit mode.