add_filter('wpcf7_form_tag_data_option', function($data, $options, $args) {
$data = [];
foreach ($options as $option) {
if ($option === 'checkbox_options') {
$data = array_merge($data, ['Checkbox Option A', 'Checkbox Option B']);
}
//...
}
return $data;
}, 10, 3);
What I don’t understand is: how can we change the checkbox values?
For example, this is part of a traditional, static form with checkboxes:
<input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
<label for="vehicle1"> I have a bike</label><br>
<input type="checkbox" id="vehicle2" name="vehicle2" value="Car">
<label for="vehicle2"> I have a car</label><br>
<input type="checkbox" id="vehicle3" name="vehicle3" value="Boat">
<label for="vehicle3"> I have a boat</label><br>
Here, the label is “I have a bike” and the value is “Bike”.
Any code related to the wpcf7_form_tag_data_option hook I found produces the same value for the value and for the label.
Is there a way to set a different value from the label?
]]>[radio field1 use_label_element default:2 "Sí|Ja" "No|Nein"]
show [group_field1] if [field1] equals "Ja"
show [group_field1] if [field1] equals "Sí"
This is really inconvenient if I have to cover all languages.
]]>May I ask you to come up with a way to show that a certain product is “on sale” or “on promo” right on the shop page?
So far, I see my “promo” badge on my product page, whenever a product has “compare at price” but not on the shop page.
In case there is such feature already, where can I find it?
I think this is a vital feature for any shop out there.
Thank you!
]]>I have an issue when displaying the posts. The corresponding labels for the fields are missing. My page is a recycling exchange platform where users can enter various fields such as material, phone number, location, and what material they wish to exchange. These fields are requested when posting, but when the post is displayed, only the fields are shown without their labels. You can see this in the links to my page:
https://remaketa.com/papel-periodico/
The image attached is an example of what I want.
https://xtemos.nyc3.digitaloceanspaces.com/wp-content/uploads/2024/09/IMG_4288.jpeg
]]>I want to put a <label> in 2 lines with a <br> (i know… i know…). But when i write it in my label, this is not interpeted (some htmlentites i guess because i got this : <br<).
Can you please help me ? If you have a better idea, i’ll be happy to hear it too.
Thanks in advance.
]]>I need to change Referenznr.: order_12345 to an invoice number from another plugin. Here is the code to get it:
// Getting invoice number
$invoice = wcpdf_get_invoice( (array) $order->get_id(), true );
$invoice_number = $invoice->get_number();
$plain_invoice_number = $invoice_number->get_plain();
How can I edit the label template to change it and still keep the plugin updates?
]]>