#83 If a field is set to required, also the title element should get a 'required' class (continue #81)

Posted in ‘ReqText VirtueMart Plugin’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by gmr-foto on Thursday, 05 November 2020 17:54 CET

gmr-foto
Hi!

I am continuing ticket #81.
Your advice requires a user to create two custom fields - one for required and one for optional.
This is currently the only way to give the customer information about a field being required in the title.
But as the 'required' option can be set per product, this "solution" could lead to big confusion!
Therefore I again request you to give the field title the 'required' class, too.
This would be a quite simple line of jQuery code:
jQuery("input.vmcustom-reqtext.required").closest(".product-field").find(".product-fields-title-wrapper .product-fields-title").addClass("required")
Isn't that easily improving your extension? ;)

Kind regards,
Gerald

uwix

Hello Gerald,

Why not use the tooltip and description field for the information for the user? It's also displayed for the required fields so that way you can inform the users.

Feel free to adapt the jQuery code to your own needs - just de-minify the customvm3.min.js to make it more readable. For now we'll not implement this "required" request in the upcoming version.

Bug? That's not a bug, that's a feature. :-)

gmr-foto
"Why not use the tooltip and description field for the information for the user? It's also displayed for the required fields so that way you can inform the users."

Because I can decide for each product to have the field required or not.
Using the tooltip and description fields would ignore the setting per product, wouldn't it?

uwix

That's true indeed - it was ment as a tip not as "that's the only way". It's a sure thing it depends on the way the products are setup and the repetition of the required fields.

We can have a long discussion about this request and as stated before; it will not be implement in the next upcoming version. We receive more feauture request and ofcourse we put them all on a request-list. But that does not necessarily mean we also implement it in the next new version.
And if you really need it and know how to implement it (as you have state in a previous message) please feel free to do so.

Bug? That's not a bug, that's a feature. :-)

gmr-foto
Here is the jQuery script:
$(document).ready(function() {
$(".product-field-display > .required").closest(".product-field").find(".product-fields-title-wrapper .product-fields-title").addClass("required");
});
For your use ...
Support Availability

Working days: Monday to Friday. The is available 24 hours a day, 7 days a week but will only be answered during workings days according CET.
Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 48 hours. When we expect longer delays we will notify you when you file a ticket or reply.