• Resolved koelner_dom

    (@koelner_dom)


    Hi,

    first i would like to thank you for this great plugin.
    Calculating the values is not my issue here.

    i would like to use a button to copy the content of a summary field (in my case fieldname31) to the clipboard in order to easyly transfer it to a different plugin on my webpage.

    I have created the form with the button and the HTML content field already, but i don’t get any script / function to work as wanted.

    I went throught the support pages already but could not find a solution.

    Any help is appreciated.

    Regards

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

    (@codepeople)

    Hello,

    If the fieldname31 is a summary field, and you want get its content, you should call a piece of code similar to:

    var content = jQuery('[id*="fieldname'+'31_"]').html();

    If you need additional help I can offer you a custom coding service through my personal website:

    https://cff.dwbooster.com/customization

    Best regards.

    Thread Starter koelner_dom

    (@koelner_dom)

    Hi,

    i managed to get the content of the summary field to the clipboard. But do you have another hint for me on how i get only the field-content, without the tags?

    What i get:

    <div ref=”fieldname26_1″ class=”cff-summary-item”><span class=”summary-field-title cff-summary-title”>Gewünschte Wohnung*</span><span class=”summary-field-value cff-summary-value”></span></div><div ref=”fieldname10_1″ class=”cff-summary-item”><span class=”summary-field-title cff-summary-title”>Personen ab 6 Jahre – 7€</span><span class=”summary-field-value cff-summary-value”>2</span></div><div ref=”fieldname11_1″ class=”cff-summary-item”><span class=”summary-field-title cff-summary-title”>übernachtungen</span><span class=”summary-field-value cff-summary-value”>2</span></div><div ref=”fieldname25_1″ class=”cff-summary-item”><span class=”summary-field-title cff-summary-title”>Hund – 3€</span><span class=”summary-field-value cff-summary-value”>0</span></div><div ref=”fieldname19_1″ class=”cff-summary-item”><span class=”summary-field-title cff-summary-title”>Endgültiger Preis</span><span class=”summary-field-value cff-summary-value”>€0,00</span></div>

    What i would need:

    Gewünschte Wohnung*
    Personen ab 6 Jahre – 7€2
    übernachtungen2
    Hund – 3€0
    Endgültiger Preis€0,00

    Regards

    Plugin Author codepeople

    (@codepeople)

    Hello,

    Please, pay attention to the code you sent me, each value in the summary is closed in span tags with the class name: cff-summary-value

    So, if you want get the values, you simply should call a piece of code similar to the following one:

    var values = [];
    jQuery('.cff-summary-value').each(function(){values.push(jQuery(this).html());});

    After running the previous code the “values” variable will contain an array with the values of fields in the summary.

    I’m sorry, but if you need additional help implementing your particular project, you should hire a custom coding service.

    Best regards.

    Thread Starter koelner_dom

    (@koelner_dom)

    Hi,

    thaks for your effort. After reading some google i found out, that

    jQuery('[id*="fieldname'+'31_"]').text();

    solved my problem.

    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Copy Summary to Clipboard’ is closed to new replies.