Add Mandatory Field
-
How do I add a mandatory field in the checkout? I can read it is possible but have’nt found info in how to do it.
Would like a mandatory checkbox like “I agree to…”
-
Or how to edit and make the existing terms and conditon tesxt mandatory
“By continuing you agree to this store’sTerms and Conditions”
Is this regarding Vipps Express Checkout or Vipps Checkout ?
For the standard Woo Checkout you will need to refer to the WooCommerce apis.
I see. It is possible, using a programmable additional consent field which is really intended for newsletter signups and so forth – but this can be made required and used for your purpose.
Since it is supposed to integrate with newsletter plugins (currently only Mailerlite, but more will be added) you will need to add some code to your child-themes functions.php or a plugin, like so:
add_filter('woo_vipps_checkout_consent_query', function ($query) { return "I agree to... "; }, 20, 1); add_filter('woo_vipps_checkout_consent_required', function ($yesno) { return true; }, 20, 1);The first filter needs to be your text, the second should return true to make the field required. The orders will be marked with “custom consent granted”, but with the field required, all will be.
For the consent text, you can use markdown, and the text can contain a single link. Remember that this will run in the Vipps window so you will not have access to your sites javascript code or anything like that.
Looks promising. Will have my agency to have a look at that.
Wishlist for newsletter signup: Hubspot 🙂 Is Hubspot in the roadmap?We can do Hubspot, yes; we prioritize this based on user requests. But NB: you get *one* custom consent field; so if used for newsletters, your usecase is lost.
Ok I see. And I guess it’s not possibke to convert the standard “By completing this purchase you agree to this store’sTerms and Conditions” to a mandatory field?
I really would like an active (mandatory) consent to terms and I’m trying to find our where (if not the Checkout) to put it without “loosing” the newsletter oppurtunity.
Any ideas?
It would have to be done by Vipps; I’ll forward your request to them.
Thanks, I think that be a nice and well used functionaliy.
In theory with the existing functionality…can I use my “extra field” to make mandatory radiobuttons (or checkbox where only one can be choosen)?
Idea:
Header/intro text write something like:
“Yes, agrese with the Terms and Conditions and…”
Followed by two radiobuttons (or checkbox)
Option 1: “would like to signup for newsletter”
Option 2: “would NOT like to signup for newsletter”Sorry; Vipps replied that they prefer the implicit consent here. You may try to lobby them, but it is probably not going to be implemented.
The custom consent checkbox is unfortunately just a single checkbox which may or may not be required (as per the filter I showed).
The topic ‘Add Mandatory Field’ is closed to new replies.