Windurin
Forum Replies Created
-
Hi. This issue seems to be fixed with the latest update of Elementor.
This issue seems to have gone away with a combination of reinstalling, deactivating or reactivating the plugins.
I got it working – it seems it does apply within the cart template of the plugin I’m using. The only thing I need to implement now is to only show the deposits info if the cart contains items where deposits are enabled. What would the condition check be for that please? Thanks.
EDIT: It’s working with the following:
<?php if( WC()->cart->deposit_info[deposit_enabled] ): ?>
Hi. Thanks, I was able to get this to show but only on the cart template page.
How can I get to to show anywhere – so for example in my popup cart which is part of the header so basically on every page? On non Cart pages the values are not accurate. It will show Due Today as £0.00 and Future Payments as the full amount for example.
I tried using global $woocommerce and replacing WC() with $wooocommerce but it’s still not working.
Hi.
I am with Siteground, but I wasn’t sure if the plugin support team might be different to the main support team.
I will create a ticket with them because my issue is in the Admin backend and I obviously can’t give those access details here.
Thanks.
- This reply was modified 2 years, 10 months ago by Windurin. Reason: Marking as resolved
I see. Thanks for the information, I will roll back for now until they update their plugin.
Hi. I’m a little confused. What is this referring to then?
https://www.acf-extended.com/features/field-groups/instruction-placement
There is an option to choose tooltip on the Field Group settings and the instructions are showing as tooltips in the backend, just not on the frontend.
Hi again. Yes, I got excited but I realise now that was a WordPress error ha. After removing get_the_ID(), I do now get the validation error in the form area. At first I had the error appearing by the true/false field but because the field is hidden the validation error message was too. After changing field name to just ” as in your later snippet, the error message appears in the general form area and is visible. Here’s an image to confirm it’s working as I wanted:
Thank you so much for your help and for the tips on debugging!
UPDATE: Using acf_log() I saw that the output was true, not 1. I thought the database value was 1 for true and 0 for false? Either way, I changed 1 to true and it now works!
My only issue: it’s just a blank page with the validation error at the top. Is there a way to format the error or have it appear on the same page? Thanks.
Hi. There might be some misunderstanding. This form is UPDATING the post, and the form is actually on the post itself so the is_card_pack_opened’ field is in the form.
But the user doesn’t actually enter any values in the form – all the fields like the Cards and points rewarded are hidden and were prefilled from when the Card Pack post was created. By ‘opening’ the pack (actually updating the post), the function to award the Cards is called and the ‘is_card_pack_opened’ field is set to true. I’ve recorded a quick video (just 42 seconds) to show you the problem, with 2 windows side by side:
The ‘is_card_pack_opened’ True/False field is normally hidden too but I’ve got it showing here just for the video. So all the user actually does is click the submit button to open the pack (update the post).
I tried the following code, including the post ID, though it is actually already the current post the form is on:
add_action('acfe/form/validation/post/form=open-bronze-card-pack-form', 'my_form_validation', 10, 3); function my_form_validation($form, $post_id, $action){ // Get field input value $post_id = get_the_ID(); $opened = get_field('is_card_pack_opened', $post_id); if($opened === 1){ // Add validation error acfe_add_validation_error('is_card_pack_opened', 'You Have Already Opened This Pack!'); } }
What am I doing wrong? Really appreciate the help and sorry if I didn’t explain it very well. I understand it’s quite a unique case.
Hi, Thanks for the response. I just tried this code and it didn’t seem to work:
add_action('acfe/form/validation/form=open-bronze-card-pack-form', 'my_form_validation', 10, 2); function my_form_validation($form, $post_id){ // Get field input value $opened = get_field('is_card_pack_opened'); if($opened === '1'){ // Add validation error acfe_add_validation_error('is_card_pack_opened', 'You Have Already Opened This Pack!'); } }
The ‘is_card_pack_opened’ field is a True/False field so when it’s checked the value should be 1 right? Where would the error message actually appear? Next to the field? The field is actually hidden, although only with CSS so the value does still get updated with update_field
Even so, I tried the above code even with the field not hidden and the form is still allowed to be submitted in the other tab.
Thanks for the response. For this particular site, my media is actually all hosted on an Amazon S3 bucket so I guess it won’t work. But I appreciate the help and I’ll still try the suggestion on another site.
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] Getting Repeater Text Field In EmailThanks Konrad, got it working now.
Just a quick note that in your snippet above you have it as acfe_get_form_action but according to the docs it’s acfe_form_get_action
So it seems the form and get were the wrong way around but I copy/pasted it from the docs so it’s all good ??
Thanks a lot.
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] Getting Repeater Text Field In EmailThanks Konrad, I will surely leave a review soon. I have just 1 more question if you don’t mind. How can I get the permalink of the post being created by the form?
E.g:
<p>Click <a href="<?php echo get_the_permalink(); ?>">here</a> to view it now.</p>
Links to the URL of the place where the form was which makes sense. I know I need a variable in the () but what would it be in this case?
On the email settings in the Form options it’s:
Click <a href="{action:post:permalink}">here</a> to view it now.
So what would the equivalent be in the code snippet?
Thanks.
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] Getting Repeater Text Field In EmailHi Konrad,
That’s exactly what I was looking for, thanks! I was struggling to figure out how to use even html within the block without the code editor shouting at me ha. Being able to write the code like frontend development is much easier for me.
Thanks again. I really appreciate the help and for proving the actual code.
Chris.