Dears,
I hope you are all doing well!
I want to make the Location Field to be required so the user can't submit the request until he selects a location on the SR form. (specially of he choose it from the search not the drilldown)
I've tried to apply the below solution but am still able to submit the requests without putting locations although I've got the blue dot beside the Location label in the right form.
Hi Mostafa,
Don't know exactly which version of Mobile do you have but in v9 you can manage to do that by these changes:
- Find page
id="createSR"
and in the section state name="isRequired"
change boolean value from false to true for state name="location"
.
<page id="createSR" title="New request" hidden="{!page.state.canLoad.page}" controller="CreateSRController">
<states id="a8pz5">
(...)
<state name="isRequired" type="object" id="jwje3">
(...)
<state name="location" type="boolean" value="true" id="wv5g6"/>
(...)
</state>
</states>
</page>
- Mark "Location" field as required (blue dot will be visible close to the field). To do that please add required tag
required="{page.state.isRequired.location}"
for label:
<page id="createSR" title="New request" hidden="{!page.state.canLoad.page}" controller="CreateSRController">
(...)
<label label="Location" tooltip-text="Identifies the location for the ticket." required="{page.state.isRequired.location}" id="ya5q6"/>
(...)
</page>
do anyone have an idea of how to make it possible?, your help is highly appreciated.
BR.
------------------------------
Mostafa Mosaad
Software Engineer
Megasoft
Cairo
01117275779
------------------------------