Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jirkad

    (@jirkad)

    Hello,

    thank you for your answer. I am using only Contact Form 7 and Date Picker by Input WP – Sync bookings with external Calendars (.ics).

    I am using my own CSS grid to style the CF7 form.

    Thanks,
    George

    Thread Starter jirkad

    (@jirkad)

    Thanks a lot, it works!

    I made my own shortcode, that returns ACF repeater fields exactly what I want.

    function e2pdf_acf_repeater() {
    
       ob_start(); ?>
       <?php if( have_rows('repeater_name', 'option' ) ): ?>
    
        <table">
              
        	<?php while ( have_rows('repeater_name', 'option') ) : the_row();
        
        		// vars
                $subfieldname1 = get_sub_field('repeater_subfield');
        	    $subfieldname2 = get_sub_field('repeater_subfield');
        
        	?>
        
        	<tr>
              <td><?php echo $subfieldname1; ?></td><td><?php echo $subfieldname2; ?></td>
        	</tr>
        	
            <?php endwhile; ?>
        
        </table>
    
    <?php endif; ?>
    <?php $output = ob_get_clean();
        return $output;
    }
    add_shortcode('e2pdf_acf_repeater_shortcode', 'e2pdf_acf_repeater');

    Thank you for your help, I’ll buy a premium to support you.

    George

    Thread Starter jirkad

    (@jirkad)

    Hi,

    thank you for the fast response. I try describe what I want to do:

    1. I have AFC Options page “Menu” where are these ACF fields:
    1.1) Date -> return date
    1.2) Menu -> repeater:
    1.2.1) Menu Name -> return text from the repeater
    1.2.1.) Menu Price -> return price from the repeater

    What I already tried:
    PDF Options: Extension WordPress, Item: Group Fields
    Shortcodes:
    [e2pdf-wp key=”Date” meta=”true” path=”0.name”]

    I don´t know, how to get it to work with the Date field and how to get Repeater fields.
    Maybe [e2pdf-foreach] is ideal for repeater fields?

    Thanks a lot, George

    Thread Starter jirkad

    (@jirkad)

    Hi Erik,

    I just figured it out with the external plugin Contact Form 7 – Dynamic Text Extension and dynamichidden field. Inside this field, I put my own shortcode which returns ACF field URL.

    Thank you for your time,

    George

    Thread Starter jirkad

    (@jirkad)

    Yes, it returns the post ID number. But unfortunately, it doesn’t work with the ACF field.

    I found this on ACF forum:

    ACF only stores the ID of the field for the meta_key/meta_value. CF7 (or the add on your using) is directly accessing the meta value and not going through ACF to get the value.

    But I am not able to make it works :/

    Thread Starter jirkad

    (@jirkad)

    I tried, but unfortunately it doesn’t work 🙁

    <?php 
     
    add_action('wpcf7_init', 'custom_acf_file_url_form_tag');
     
    function custom_acf_file_url_form_tag(){
        wpcf7_add_form_tag('acf_file_url', 'custom_acf_file_url_form_tag_handler');
    }
     
    function custom_acf_file_url_form_tag_handler($tag){
        global $post;
        $acf_field = get_field('produkt_schema', $post->ID);
        $url = $acf_field['url'];
     
        //create html and return
     
        $html = '<a href="'.$url.'" target="_blank">Stáhnout produktový list</a>';
     
        return $html;
        
    }
    
    ?>
    Thread Starter jirkad

    (@jirkad)

    I’m sorry, I already figured it out.

    It was my fault, I forgot one quote in the code.

    Thansks, George

Viewing 7 replies - 1 through 7 (of 7 total)