• Resolved wpdia

    (@wpdia)


    I created a Calculated Field name is : fieldname56

    The Set Equation data as below:

    (function(){
    return 'Unit 10854 Balby Carr bank DONCASTER, United Kingdom';
    })()

    and i created other Calculated Field name is : fieldname57

    The Set Equation data as below:

    (function(){
    var address=fieldname56;
    jQuery('.display-here').html(
    "<div class='col' data-label='Address:'>"+address+"</div>"
    );
    })()

    The problem is only show the number “10854” . The English letters disappeared.
    What should i do ?

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

    (@codepeople)

    Hello @wpdia,

    Please, modifies the equation as follows:

    
    (function(){
    var address=fieldname56|r;
    jQuery('.display-here').html(
    "<div class='col' data-label='Address:'>"+address+"</div>"
    );
    })()
    

    Pay attention to the modifier |r in the piece of code: var address=fieldname56|r;

    It means, give me the raw value of the field without pre-process it.

    Best regards.

    Thread Starter wpdia

    (@wpdia)

    @codepeople Many Thanks . Resolved

    I have the same topic with Checkboxes DS. How can I solve it here that the complete name and not only the number is output?

    For Example:

    (SELECT ‘<%fieldname51%>’ as text, REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(paypal_post, ‘fieldname19’, -1), ‘;’, 2), ‘:’, -1), ‘”‘, ”) as value FROM {wpdb.prefix}cp_calculated_fields_form_posts WHERE formid=10 order by id desc limit 1) UNION (SELECT ‘<%fieldname235%>’ as text, REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(paypal_post, ‘fieldname19’, -1), ‘;’, 2), ‘:’, -1), ‘”‘, ”) as value FROM {wpdb.prefix}cp_calculated_fields_form_posts WHERE formid=11 order by id desc limit 1)

    The fieldname235 contains the result of a Calculated field equation and consists of text and number.

    Plugin Author codepeople

    (@codepeople)

    Hello @badmax69,

    In the current version of the plugin the tags with the structure <%fieldname51%> in the queries associated to the DS fields are replaced by their pre-processed values. So, with the current version of the plugin, if you value in the calculated fields have the structure: xyz123, I recommend you to edit the query, including the text directly in the query:

    SELECT xyz<%fieldname51%> as text,

    Note: For the next update of the plugin, I’ll implement the possibility to use the tags with the structure: <%fieldname51|r%> into the queries.

    Best regards.

    • This reply was modified 7 years, 5 months ago by codepeople.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Calculated Field problem’ is closed to new replies.