-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Problem with the form widget / checkbox #868
Comments
Hi, Which Astroid version is this running? Does this happen with all elements for Mandatory \ Field required? Apart from the issue, does the form work correctly and send emails? (asking the question due to a different logged issue). |
Thank you for the update and video, it makes your issue clearer. I will try and replicate your issue but I having a slight issue in getting my form working #867 EDIT:- Which Joomla version are you running? |
I'm working with J5.2.1. |
I have tested it. The error also occurs in the following field types: Radio, Select, Range |
Well the good news is you have partially assisted in getting my test form working. I took a different approach on the basis of knowing that the basic process of your form is working. I will replicate and test your setup later. |
I have read this #867 (comment) I have also integrated the form in the layout and not via the articles. I simply assigned the widget to the corresponding menu item. |
Thank you I will check it and response asap 👍 |
@sonvnn For this one Lines 147-148 Need to be changed to in formbuilder/ajax.php
|
Thanks, you can create a pull request. I will check and merge it to the master branch :) |
@jam1974 I can recreate this issue, a quick look suggests that there isn't any code implemented for the checkbox and radio options to make this work. For the select, I don't think we can do much as something is always selected, ideally we need something like a "please select" which has no value, so it won't proceed unless something is selected. I'll put a pull request in for the success and error message but you can test this yourself if you want to manually try it. #868 (comment) |
@felixkat #868 (comment) works. For the checkbox, I don't think it's a solution if I select “Please select”. I think about a function for the PrivacyCheckbox. Okay, maybe you need a new form type for this. |
Yes I understand, for the Privacy Checkbox it should be a checkbox or radio, I will try and look at the code later. But in other situations that require a selection before proceeding a "Please select" would be useful otherwise it will always use the default. |
@felixkat I do not consider a selection for confirmation to be useful in this case. Today I tried to integrate a function that can be activated like the forwarding url or the captcha. When I activate it, I get a field in which I can enter the desired text. And if this is activated, the sending of the email is blocked in the form as long as the checkbox is not selected. but my knowledge is probably not sufficient. |
I agree, I was just thinking about other cases where this may be useful. Ideally the function needs to work with all fields.
The check \ radio needs to be modified to prevent form submission if the boxes are not checked. I will try and take a look later or maybe @sonvnn |
@jam1974 I've made the changes to check boxes and radio You can download formbuilder.php here to test. |
@felixkat thanks for the revised code - but now i also get the message: undefined |
What version or commit are you on? I think Sonny has made some changes today which may not yet be complete. If you are on today's commit you can download the following file as well to keep everything in sync. |
The issue from this |
@sonvnn I have integrated the form in the layout and not via the articles layout. The widget is assigned to a menu item. |
@jam1974 The code Sonny is working on isn't completed yet, so may break if you use the latest commit, even with layout. If you use the two links I posted earlier it should work until Sonny has a chance to finish. Just download the two files only, (not the whole zip file), and replace your existing ones. |
The formbuilder.php (https://github.com/felixkat/astroid-framework/blob/e62bfce83e3954aa7fac4720b4b75236215bdd20/framework/elements/formbuilder/formbuilder.php) thanks @felixkat in combination with the v3 (0a0433a) thanks @sonvnn fixes the problem. Email is now only sent if the checkbox is activated. |
Thanks for testing @jam1974. I'll submit a fix for the checkbox, I'll let you know when it's in the main code so you can test again. |
When selecting a checkbox with the property Mandatory, the dispatch works even if the box is not activated.
The text was updated successfully, but these errors were encountered: