Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    You cannot insert a field directly in the table, but you can display its value in the table.

    For example, If the code inserted in the HTML Content field is:

    <table>
      <tr>
        <td>My field label</td>
        <td id="f1"></td>
      </tr>
    </table>

    then, it is possible to insert the value into the tb tag, through an equation as follows:

    (function(){
    jQuery( '#f1' ).html(fieldname1);
    })()

    and that’s all.

    If you want to display the fields in the form with a table format, you should use the special class names: column2, column3, and column4, or container fields (DIV, or FIELDSET)

    http://cff.dwbooster.com/faq#q66

    Best regards.

    Thread Starter shiznitxxx

    (@shiznitxxx)

    thanks and there would be something else if you can help me …
    There is a <div id=”fieldname8_2″ class=”dfield”> class name dfield witch is width is 65% all my fields uses that …. how can i make for a particular field like the HTML content to display at 100% width

    Plugin Author codepeople

    (@codepeople)

    Hi,

    Each field in the form includes the attribute: “Add Css Layout Keywords” that allows assigning to the field any class name.

    For example, if you assign the class name: myclass to the field that will be displayed at 100%, then, will be possible define the new class in any of the CSS files used by your web page:

    #fbuilder .myclass .dfield{ width:100% !important;}

    Tip: Remember to clear the browser’s cache after edit the online files.

    Best regards.

    @codepeople

    I’m using the example you have written here. The problem is, I’m having a hard time retrieving the values from fields in the Calculated Fields Form. My understanding is, every field is assigned a field number and we can use these field numbers as variables to retrieve their corresponding values.

    (function(){
    jQuery( '#f1' ).html("hello hello hello");
    })()

    This is fine and returns a string “hello hello hello”.

    (function(){
    jQuery( '#f1' ).html(fieldname21);
    })()

    This does not work for me. It doesn’t return anything and seems to not recognize fieldname21. I tried replacing fieldname21 with other fields on my form and nothing comes up. There are values written down on those fields so it shouldn’t be returning null values. Am I missing anything?

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The structure of the equation is correct, but I need check the form in action to see the fields names, and the form’s settings.

    Could you send me the link to your webpage, please?

    Best regards.

    It is hosted locally at the moment. I want to insert the values from certain fields in Calculated Fields Form into Contact Form 7. At least I know the structure of my code is correct so I can start debugging in other places

    Plugin Author codepeople

    (@codepeople)

    Hi,

    I’m sorry, I need to check the form in action to check its structure. Could you publish your website in a public web server, please?

    Best regards.

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

The topic ‘insert fieldname value in HTML content’ is closed to new replies.