-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Allow users to set read-only fields for the form. #319
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I watched the screencast. Great screencast. Here are some changes.
Multiline input
Each line break needs to be converted into a <br>
tag in the <p>
inner HTML.
Star rating
Only show the number of stars matching the selected value
Checkboxes
Don't show all the options. The screencast showed 2 options are available, and none were selected. The output should show all the selected options in an unordered list.
Radios
Don't show all the options. The screencast showed 2 options are available, and none were selected. The output should show all the selected option in a <p>
tag.
@tonytlwu |
If nothing is selected, show Note that the values could still be loaded by |
@tonytlwu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkboxes
At 0:10 you set a default value for the checkbox, but I don't see any values displayed at 0:14 after it's marked as read-only.
Multiline
If read-only is enabled, hide the Rows option because it's no longer relevant.
To display selected checkboxes I checking if we have a checkbox option in value. And it seems that on the edit screen which you see on 0:14 we don't have set value yet but in build, value is set. I wasn't able to figure out why it's happening. |
@YaroslavOvdii Please provide more technical detail of what's wrong and what you've tried to do to resolve it. |
@YaroslavOvdii Yes, that's the same behaviour I saw in the other video too. I need you to investigate to find out why this is technically happening. |
@tonytlwu with my further investigation I've discovered that we do not update a value in the interface because when we check the default value we are calling this emit but in the interface, there is nothing that is listening for this event. So I've tried to add listener on this event the same as in build but it appears that the method that we use in build doesn't exist in the interface. And unfortunately, I wasn't able to determine what library is controlling the interface. Could you please pinpoint where I can look to solve this issue? |
@YaroslavOvdii @squallstar will be more equipped to help you with the challenge |
@YaroslavOvdii the Here is where onInput is defined: fliplet-widget-form-builder/js/libs/form.js Lines 316 to 335 in 4a99aec
I am not sure whether you actually need that for achieving your feature but you can give it a go at copying it where required if necessary. |
@sofiiakvasnevska
Issue
https://github.com/Fliplet/fliplet-studio/issues/6734
Description
Allow users to set read-only fields for the form.
Screenshots/screencasts
https://share.getcloudapp.com/lluJrqBq
Backward compatibility
This change is fully backward compatible.
Reviewers
@upplabs-alex-levchenko