Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter hiteshmandali

    (@hiteshmandali)

    Hello @codepeople

    Thanks for the reply but that solution is not working with classic editor.

    I try to add into wordpress classic editor of the post after form shortcode still getting issue.

    Still form is not loaded with ajax content.

    Thanks,
    Hitesh Mandali

    • This reply was modified 4 years, 6 months ago by hiteshmandali.
    Thread Starter hiteshmandali

    (@hiteshmandali)

    Hello @codepeople

    Thanks for the quick reply.

    I tried that but after that shortcode is not displaying but form also not displaying in ajax content.

    Basic form structure is generated but form elements are not rendered.

    It display like this.

    <form name="cp_calculatedfieldsf_pform_1" id="cp_calculatedfieldsf_pform_1" action="?" method="post" enctype="multipart/form-data" class=""><input type="hidden" name="cp_calculatedfieldsf_id" value="5"><pre style="display:none !important;"><!--noptimize--><script>form_structure_1=[[{"form_identifier":"","name":"fieldname2","shortlabel":"","index":0,"ftype":"fnumber","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Loan Amount","predefined":"20000","predefinedClick":false,"required":false,"readonly":false,"size":"small","thousandSeparator":"","decimalSymbol":".","min":"","max":"","formatDynamically":false,"dformat":"number","formats":["digits","number","percent"],"fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname13","shortlabel":"","index":1,"ftype":"fPageBreak","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Page Break","fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname6","shortlabel":"","index":2,"ftype":"fnumber","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Residual Value","predefined":"10000","predefinedClick":false,"required":false,"readonly":false,"size":"small","thousandSeparator":"","decimalSymbol":".","min":"","max":"","formatDynamically":false,"dformat":"number","formats":["digits","number","percent"],"fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname7","shortlabel":"","index":3,"ftype":"fnumber","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Interest Rate %","predefined":"7.5","predefinedClick":false,"required":false,"readonly":false,"size":"small","thousandSeparator":"","decimalSymbol":".","min":"","max":"","formatDynamically":false,"dformat":"number","formats":["digits","number","percent"],"fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname15","shortlabel":"","index":4,"ftype":"fPageBreak","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Page Break","fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname8","shortlabel":"","index":5,"ftype":"fnumber","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Number of Months","predefined":"36","predefinedClick":false,"required":false,"readonly":false,"size":"small","thousandSeparator":"","decimalSymbol":".","min":"","max":"","formatDynamically":false,"dformat":"number","formats":["digits","number","percent"],"fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname5","shortlabel":"","index":6,"ftype":"fSectionBreak","userhelp":"Results based in the data entered above:","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"","fBuild":{},"parent":""},{"dependencies":[{"rule":"","complex":false,"fields":[""]}],"form_identifier":"","name":"fieldname4","shortlabel":"","index":7,"ftype":"fCalculated","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Monthly Payment","predefined":"","required":false,"size":"medium","eq":"prec((fieldname2*fieldname7\/1200*pow(1+fieldname7\/1200,fieldname8)-fieldname6*fieldname7\/1200)\/(pow(1+fieldname7\/1200,fieldname8)-1),2)","suffix":"","prefix":"","decimalsymbol":".","groupingsymbol":"","readonly":true,"formatDynamically":false,"hidefield":false,"dformat":"number","fBuild":{},"parent":""},{"dependencies":[{"rule":"","complex":false,"fields":[""]}],"form_identifier":"","name":"fieldname9","shortlabel":"","index":8,"ftype":"fCalculated","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Total Payment","predefined":"","required":false,"size":"medium","eq":"prec(fieldname4*fieldname8,2)","suffix":"","prefix":"","decimalsymbol":".","groupingsymbol":"","readonly":true,"formatDynamically":false,"hidefield":false,"fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname14","shortlabel":"","index":9,"ftype":"fhtml","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","fcontent":"\u003Cscript\u003E\n\tgetCalculatedFieldsFormCta();\n\u003C\/script\u003E","fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname12","shortlabel":"","index":10,"ftype":"fhtml","userhelp":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","fcontent":"\u003Cdiv class=\u0022quiz-cta-shortcode  hide\u0022\u003E2922\u003C\/div\u003E\n\n","fBuild":{},"parent":""}],{"0":{"title":"Lease Calculator","description":"This sample uses a more complex formula for a lease calculator. It includes the \u0022power\u0022 (pow) and \u0022precision\u0022 (prec) functions.","formlayout":"top_aligned","formtemplate":"","evalequations":1,"evalequationsevent":2,"autocomplete":1,"persistence":0,"customstyles":""},"formid":"cp_calculatedfieldsf_pform_1"}];</script><!--/noptimize--></pre>
    <div id="fbuilder">
      <div id="fbuilder_1">
          <div id="formheader_1"></div>
          <div id="fieldlist_1"></div>
      </div>
    </div>
    <div class="clearer"></div>
    </form>

    As filed list div is blank.

    Thanks,
    Hitesh Mandali

    Thread Starter hiteshmandali

    (@hiteshmandali)

    Hello @codepeople

    I have checked the code and found that in CPCFF_MAIN class init() method uses function is_admin() which return true during ajax call.

    Note:
    WordPress sets is_admin() to true for all ajax requests (front-end or admin-side). (See codex).

    Due to this method “_define_shortcodes” is not called.

    Thanks,
    Hitesh Mandali

    • This reply was modified 4 years, 6 months ago by hiteshmandali.
    Thread Starter hiteshmandali

    (@hiteshmandali)

    Hello @codepeople

    Thanks for quick reply,

    After adding this script in editor after short code i am getting following error on console.

    “VM1043:2 Uncaught ReferenceError: fbuilderjQuery is not defined”

    And still shortcode is not working on ajax content.

    Thanks & regards,
    Hitesh Mandali

    Thread Starter hiteshmandali

    (@hiteshmandali)

    Hi @codepeople

    Thanks for the quick response.

    Method selecting the “Direct” option for the “Script load method” is not working for me.
    Still showing shortcode in ajax loaded content.

    Thanks,
    Hitesh Mandali

    Thread Starter hiteshmandali

    (@hiteshmandali)

    Hello @codepeople

    I have create video for explanation in detail please find below video link which help you to understand my issue.

    https://www.awesomescreenshot.com/video/140846?key=3e511e51c28bc3098e378623771fd8f0

    Thanks,
    Hitesh Mandali

    Thread Starter hiteshmandali

    (@hiteshmandali)

    Hi, TobiasBg Thanks for your reply,

    We have used that method but when we used that method ajax providing internal server error.
    Here is my code of the ajax function.
    // My ajax call function
    add_action(‘wp_ajax_getlatestpost’, ‘getlatestpost’);
    add_action(‘wp_ajax_nopriv_getlatestpost’, ‘getlatestpost’);
    function getlatestpost(){

    global $post;
    $latest_post = get_post(7);
    $content = $latest_post->post_content;

    TablePress::$controller = TablePress::load_controller( ‘frontend’ );
    TablePress::$controller->init_shortcodes();
    $content = apply_filters(‘the_content’, $content);
    $content = str_replace(‘]]>’, ‘]]>’, $content);
    echo $content;
    wp_footer();
    exit();
    }

    when I add controller ajax is providing internal server error.
    I have put this code in my function.php file.

    Thanks
    Hitesh Mandli

    Thread Starter hiteshmandali

    (@hiteshmandali)

    Hi,

    If I load DataTables JS libraries on my page load then can you please explain the process how can start processing TablePress Shortcode through Ajax request.

    As it’s necessary for my site to have around 1500 post and having trouble with table press.

    So, Please help us to figure out this issue.

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