Forum Replies Created

Viewing 1 replies (of 1 total)
  • i solved this problem with jQuery:
    I have post type PRODUCTS and i load my CTP7 by shortcode in single-products.php

    The first, i get the title of products page:

    $title = get_the_title();

    <h2 dataTitle=”<?php echo $title; ?>”><?php echo $title; ?></h2>

    Next, in admin panel of my form, i create 1 text field to get my title products, and dont show in front end

    <div style=”display: none”>[text title_product id:title_product placeholder "Title"]</div>

    I used a little bit jquery to fill title to my text field when load page:
    $(document).ready(function(){
    var title = $(‘h2’).attr(‘dataTitle’);
    $(“input#title_product”).val(title);
    });

    in message body of form, i call my title of page
    [title_product]

Viewing 1 replies (of 1 total)