Hello, our team uses FormMaker, and found making controls read-only still allows a user to change (and save) them.
So, is there a way to make read-only controls uneditable?
So, is there a way to make read-only controls uneditable?
We use cookies and analytics on our website to support technical features that enhance your user experience.
-
RE: disabling controls, in FormMaker
I assume this is related to thread id 5821.
Based on your description, I assume you are using WebMaker pre v7. Please let us know the exact version information.
Also, are you trying to disable the field using standard WebMaker features or using script?
Thanks
Abdul
RE: disabling controls, in FormMaker
Hello Abdul, thank you for replying.
I'm not certain of our Hyfinity version, though our Licence file-name is 'MVC2-7_2007-02-23_UHS_15Professional_licence.hyf'.
Our group is using FormMaker, and have found the 'read only' selection (under Field Details --> Advanced Options) does not render the control to be output-only, which is our goal.
We have not tried resolving with script, and thank you for your suggestions.
RE: disabling controls, in FormMaker
Here's our version of Hyfinity: MVC Professional Edition v2.7.
Thank you,
RickO
RE: disabling controls, in FormMaker
Have you tried setting the 'please choose disable method' to 'disabled' instead of 'read only' in 'Field Details|Advanced Options'?
Also, if the field is still editable, are you sure the 'Disable If' XPath in 'Data Bindings' is actually matching something in your data?
Hope this helps.
Kind Regards
Abdul
RE: disabling controls, in FormMaker
Hi Abdul,
Thank you for offering your suggestions, though neither succeeded.
--When a different Control (the Page has many) is changed and the Page saved, my 'disabled' radio-button Controls (their disable method is 'disabled') no longer display values, once the Screen refreshes.
--And, when disable method is 'read only' and (on the Data Bindings Tab) 'Disable If' is true(), the radio-button Controls continue to be editable.
(Our goal is to have several radio-button Controls display their values, yet be uneditable.)
Any other ideas would be very welcome, Abdul.
Thank you very much,
RickO
RE: disabling controls, in FormMaker
Thanks for the extra info. In the version you are working with, the 'read only' option is primarily applicable for 'edit-type' fields. This explains the behaviour for your radio buttons when the disable method is set to 'read only'.
When the disable method is set to 'disabled', FormMaker uses the standard browser property to disable controls. This explains why your data is not being submitted. The main approach you can try is to:
- Set the disable method to +?+?++disabled+?+?+? for each of the radio buttons.
- Create a hidden field for each of your radio buttons. For these hidden fields tick the +?+?++Hide field Based on Runtime Data+?+?+? option under Field Details|Advanced Options. For these hidden fields use the same +?+?++Disable If+?+?+? XPaths as defined in the corresponding radio buttons for the +?+?++Hide If+?+?+? XPath in Data Bindings, but with a not() around the hidden field XPaths.
- Use the same +?+?++Handler to Page+?+?+? and +?+?++Page to Handler+?+?+? Bindings for both the radio and corresponding hidden fields.
This essentially means that the hidden field will be removed if the radio button is active and able to submit data and present but hidden with the same data as the radio button to be able to submit this data when the radio button is disabled.
I hope this makes sense.
Good luck.
Abdul
RE: disabling controls, in FormMaker
Hello Abdul,
Thank you for your interesting reply, which does make sense. I plan to share these details with my colleagues and manager, before getting underway.
To be accurate, Abdul, we are trying to change six controls (2 text-boxes, 4 radio-buttons) to be read-only; are text-boxes considered 'edit-type' fields?
And currently, the 4 radio-buttons have only this in their 'Disable If' XPaths: " Disable If true() ". Shall we assign this to their hidden radio-button XPaths? " Hide If not( true() )" .
Thanks again,
RickO
RE: disabling controls, in FormMaker
Yes, text boxes are 'edit-type' fields and these should work with the 'read only' option.
If your radio buttons are only using the XPath true() then you shouldn't need to set anything for their corresponding hidden fields for 'Hide If'. In fact, you could simply not tick the +?+?++Hide field Based on Runtime Data+?+?+? in Field Details for these hidden fields.
Hope this helps.
Abdul
RE: disabling controls, in FormMaker
Hello Abdul,
Though my hidden field is created, and is given the same XPath Guidelines as the existing radio-button, it doesn't appear to operate: the visible radio-button still 'clears' its values, and does not submit its data.
Additionally - in my Hidden field - under Advanced Options 'Disable Field Based on Runtime Data?' is present, but 'Hide Field Based on....?' is not.
These attributes for the hidden field are set as well:
In Field Details, toggling "Value is static | dynamic" has not worked;
In Advanced Options, Generate Field? is ticked, and Disable Field is not.
Perhaps I've made an error, Abdul, associating my Hidden field to the radio-button.
Thank you,
RickO
RE: disabling controls, in FormMaker
Some of the settings you are describing sound a bit odd. There is no direct association between the radio buttons and hidden fields as such, just implied by the same XPaths.
Do you have some screen shots of the Field Details and Data Bindings screens?
Is your project just a test project? Are you able to send an export of your project? We can look at it for you. If it's sensitive you can always send it to support @ hyfinity.com
Regards
Abdul
RE: disabling controls, in FormMaker
Hello Abdul,
Thank you for your helpfulness....I will ask my management what they'd like to do next.
Abdul, if we take your suggestion and email screen-prints, we must send them to " support @ hyfinity.com (attention: Abdul) " ?
(Abdul, my management might ask if you're a member of Hyfinity's customer-support staff, and this Forum's Moderator, too.)
RE: disabling controls, in FormMaker
Yes, I am a member of the Hyfinity Team. You can simply address any submissions to support @ hyfinity.com . This is monitored by the support team.
Hope this helps
Abdul
RE: disabling controls, in FormMaker
I've attached an export of an example if this helps. You should be able to unzip and point to the exported_project.xml file in your import option in XDE.
This may help.
Abdul
RE: disabling controls, in FormMaker
Hello Abdul,
Your 'radiotest' example is a big help: it's become our model, and the one radio-button we've updated is 'working as advertised'.... thank you! :)
Would you say we can apply hidden fields to our two text-boxes, Abdul, with the same success? (disabled, but retaining their text as read-only).
Thanks again,
RickO
RE: disabling controls, in FormMaker
You are welcome :)
Yes, you can use the same approach for text boxes, but as I've mentioned before, text boxes should work when the 'read only' option is ticked for the disable method. You can then tick the 'Disable Field Based on Runtime Data' and enter your XPath for the 'Disable If' in Data Bindings.
The difference between the 'read only' and 'disabled' methods is that the Browser will not provide any visual clues that the field is disabled with the 'read only' option. You will therefore have to style the field yourself. You can locate such settings under 'Field Style Details' within 'Field Details'.
I have attached radiotest2 with a text box.
Hope this helps.
Abdul
RE: disabling controls, in FormMaker
Hello Abdul,
Thank you again for your excellent advice, to render our radio-buttons and text-boxes 'read only'. We are pleased with the result, and appreciate all your helpful guidance.
Thanks very much,
RickO