How to get just the total field to show up in Template File

I have embedded a form that has a price and total field including other fields in a template file using shortcode and all the fields works fine but i want to show just the price and total field on top of my page using the $field_one = GFAPI::get_field( 4, ‘10’ ); my form ID is 4 and the total field is 10.2 (from merge tags) but nothing is displaying, Please what am I doing wrong?

Looks like you’re trying to display the fields in a different placement? If so, you can’t render the fields outside of the form context, you will want to use CSS to position your fields instead of the GFAPI. In the following link you can find CSS targeting examples: CSS Selectors Archives - Gravity Forms Documentation

Apart from the CSS is there no php code i can call the price or the total field with?, I already have the two fields (Total and Price Fields) right before the submit button, But i also want to show it somewhere above the header

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.