I want to share about the additional capabilities that we can achieve with Glide’s native form. What I have tested with the help of CSS is that native forms can also be applied for validation.
I’m so impressed with this solution that I’m going to feature it on my YouTube channel. I’ll link to your post in the description to give you full credit.
I have watched your video, it’s very good in breaking down the steps to make it clearer. Thank you, Bob. I’m really glad to be able to share.
Additionally, for general knowledge, especially in sensitive cases, this method can still be hacked by users, in other words, the button can be reactivated in the developer tools. Therefore, I still hope that the prevention of the submit button can be provided by Glide.
@Robert_Petitto did you know that the form also updates the time? It should now be possible to prevent the form from being submitted within the time limit.
This code still works for me. The major issue is that the devtools have been slowing down increasingly over the past few weeks. Today, it’s even worse, as it freezes under 10 seconds. I can’t inspect the CSS accurately.
Robert, sorry I was in a hurry to rest last night. What problems did you encounter? What I found was an issue with the language not matching the aria-label. Besides that, the most common issue is errors in writing comment codes. This is the hardest to clarify because the impact of the errors is only partial. So they feel that if other CSS is still working, why isn’t this one?
Hi @Himaladin I tried the hack, and it worked really well. I encountered the limitation of being able to use it only once, because if I use it on different pages, it hides the button whenever ‘prevent-submit’ is present on any of them. Do you have any ideas on how to limit it to a specific form?
Could you explain more about what you mean? Actually, my code won’t work as long as you don’t write the class name “prevent-submit” in the component, and this code also doesn’t hide anything; it only makes it inactive (pointer-events: none;).
Hi @Himaladin , thanks for replying! I’m currently using the class “prevent-sumit” on 2 different screens. If it’s displayed on either of these two, it disables ALL the submit buttons in the app. Is there a way to limit it so that it only disables the “submit” button on the pages or overlays where the “prevent-submit” class is located?
Hi @Mauro_Ayala,
I don’t quite understand the state of the two different screens from you. Are you working with a custom form, or is your second screen an overlay on top of the first screen? Regardless, if you can change the name/label of the button, it will not be affected.