WooCommerce checkout field filled with form tag, when it should come empty from form #68
-
Hey, absolute amazing what you have build here, congratulations! One quick question, how do I get a value from my form at the WooCommerce checkout page? I dont need it as input field or something like that, I just need to check if the value is filled. If it's filled I can unset billing_company. If its not filled, I have to show the field billing_company. I need to do this, because on my form I have a selection if someone is a private person or a company. If it is a private person, the company input field is hidden. Till here, everything is fine. But after filling the form and going to WooCommerce checkout, the original WooCommerce billing_company field is filled with my tag from the form; in this case "{Billing_Firma}". this is not good as the field is also present on the invoice, in the mails etc. Thanks for your answer and best regards. Keep up the good work! Luis |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Luis, The "problem" here is that when you conditionally hide a column any fields inside this column basically do not exist. What you will want to do here is add a "Variable field". Just add a Hidden field element, then rename it to Then rename the original Now you can define your variable conditions so that whenever Now you add another conditional check, which checks against Now you can us the tag Hope it makes sense. |
Beta Was this translation helpful? Give feedback.
Hi Luis,
The "problem" here is that when you conditionally hide a column any fields inside this column basically do not exist.
That's why the tag
{Billing_Firma}
will just hold the value "{Billing_Firma}", it's basically plain text, because there is no field with that name if it's conditionally hidden.What you will want to do here is add a "Variable field". Just add a Hidden field element, then rename it to
Billing_Firma
.Then rename the original
Billing_Firma
topre_Billing_Firma
.Now you can define your variable conditions so that whenever
{pre_Billing_Firma} == ""
(empty)When it's conditionally hidden it will be an empty string, so the above condition will return true, in this case y…