- Form's <textarea> attribute "required" is missing even after setting it in the component's settings:
Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Content In Form --> Yes (required) --> Save - <textarea> inline CSS height is incomplete. It should be "height=250px" instead of "height=250"
Form <textarea> corrections needed on version 4.0.0
-
- Phoca Newbie
- Posts: 6
- Joined: 13 May 2022, 09:46
Form <textarea> corrections needed on version 4.0.0
- Jan
- Phoca Hero
- Posts: 48398
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Form <textarea> corrections needed on version 4.0.0
Hi, sorry, I don't exactly understand what do you mean?
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 13 May 2022, 09:46
Re: Form <textarea> corrections needed on version 4.0.0
Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Content In Form --> Yes (required)
Even though the content's <textarea> field is set as "required", still a submission is allowed with blank content.
However setting the name and the email fields as "required", no submission is allowed if any of these fields are left blank.
Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Name In Form --> Yes (required)
Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Email In Form --> Yes (required)
Even though the content's <textarea> field is set as "required", still a submission is allowed with blank content.
However setting the name and the email fields as "required", no submission is allowed if any of these fields are left blank.
Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Name In Form --> Yes (required)
Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Email In Form --> Yes (required)
- Jan
- Phoca Hero
- Posts: 48398
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Form <textarea> corrections needed on version 4.0.0
Hi, there is no browser check for the editor form field as this is not possible but it is protected by server side:
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 13 May 2022, 09:46
Re: Form <textarea> corrections needed on version 4.0.0
Actually there is a browser check.
If we place the "required" property in the <textarea> element, the browser will not allow the form to be submitted with blank comments. Instead, the browser will pop up a message pointing to the <textarea> field saying "Please fill out this field.".
The HTML <textarea> element should be like this:
The option "Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Content In Form --> Yes (required)" should had placed the "required" property in the <textarea> field. But it doesn't.
It's as if we have a duplication of the option "Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Content In Form --> Yes". Both options yield the same result.
The Joomla3 version treats the two options discretely and does add the "required" property in the <textarea>.
Nevertheless I used a jQuery script for my purpose:
If we place the "required" property in the <textarea> element, the browser will not allow the form to be submitted with blank comments. Instead, the browser will pop up a message pointing to the <textarea> field saying "Please fill out this field.".
The HTML <textarea> element should be like this:
Code: Select all
<textarea required></textarea>
It's as if we have a duplication of the option "Phoca Guestbook --> Control Panel --> Options --> Form (tab) --> Display Content In Form --> Yes". Both options yield the same result.
The Joomla3 version treats the two options discretely and does add the "required" property in the <textarea>.
Nevertheless I used a jQuery script for my purpose:
Code: Select all
$('#jform_guestbook_content').prop('required', true);
- Jan
- Phoca Hero
- Posts: 48398
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Form <textarea> corrections needed on version 4.0.0
Hi, thank you for the code. The problem is if the editor which transforms the textarea code will accept this option
Jan
Jan
If you find Phoca extensions useful, please support the project