• Resolved zuccherato

    (@zuccherato)


    Hello, great plugin! I need help with one thing.

    I use lots of sliders in my form so the client can select how many of each product he wants. The calculated field shows the total price of the order and the summary shows the entire order.

    However, it shows lots of products, even though all of them are zeroed. Is there an way to show in the summary only the fields which are > 0 ?

    Thanks!

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

    (@codepeople)

    Hi,

    In this would be needed to edit the plugin’s code. Please, visit the following entry with a similar question:

    https://wordpress.org/support/topic/calculated-fields-form-summary-field-display-none-when-there-is-no-input/

    However, in this case the modification would be:

    if( e.hasClass( 'ignore' ) || /^\s*$/.test(tt.find( '.cff-summary-value' ).html()) || /^0$/.test(tt.find( '.cff-summary-value' ).html()))

    Best regards.

    Thread Starter zuccherato

    (@zuccherato)

    I already had seen the link and tried something like that, but it didn’t work.

    With this new code, it isn’t working either 🙁

    This is where the form is: http://bigbangcandylab.com.br/pedidos/

    Thread Starter zuccherato

    (@zuccherato)

    Hi there,

    It worked! The problem was I was using a caption with the field, so the value was different than 0.

    Thanks!

    Thread Starter zuccherato

    (@zuccherato)

    Hello,

    One more question: This worked in the summary. How do I replicate this for the emails processed? I don’t want the 0’ed fields to be shown in the email. Is that possible?

    Thank you very much.

    Plugin Author codepeople

    (@codepeople)

    Hello @zuccherato,

    In this case you should replace the special tag: <%INFO%> from the email, by the tags of each field, for example, if your form includes the field: fieldname1, the special tag to insert would be: <%fieldname1 separator={{: }}%>, but if you want to include the field only if it has assigned a value, the tags to insert would be:

    <%fieldname1_block%><%fieldname1 separator={{: }}%><%fieldname1_endblock%>

    More information in the following link:

    http://cff.dwbooster.com/documentation#special-tags

    Best regards.

    Thread Starter zuccherato

    (@zuccherato)

    EDIT: Nevermind!!! It worked, it’s all OK now 🙂 Thanks!

    ——————-

    Great, it (almost) solved my issue!

    The point is: I have lots of fields in my form (this one: http://bigbangcandylab.com.br/pedidos/).

    But the very first combobox (“Tour Interlgalactico Discovery I”) has condition tags. If you select 1, it will open an additional fieldset with six more fields. If you select 2, it will open two fieldsets and go on.

    All the other fields are simple. So, the <%INFO%> brings me 0’ed products, but if I select 0 Discovery I, it won’t bring me the additional fields for it.

    If I do the way you told me, it will work for every field in the form, but not for the additional fields (since there is always a value for one of them).

    So, the <%INFO%> works for the Discovery and not the rest, and the specific tag work for the rest but not the Discovery one.

    I’m reading the documentation to see how to fix it. Is there any way to specify not to bring the tag if it has a specific value? In this case, I could input a blank value with a label “please choose” or something like it, and the tag would ignore this label and only print the fields with a different value selected.

    Thank you very much, I guess this is the last issue I need to have my form properly setup and working.

    • This reply was modified 7 years, 5 months ago by zuccherato.
    Plugin Author codepeople

    (@codepeople)

    Hello @zuccherato,

    If you have inserted a DropDown field (fieldname1), and the first choice has the “Select one optio” text, for example, leave its value in blank, and then, insert the corresponding tag as follows:

    <%fieldname1_block%><%fieldname1 separator={{: }}%><%fieldname1_endblock%>

    If you have defined dependencies between fields, and the dependent fields are inactive, the block:

    <%fieldname1_block%><%fieldname1_endblock%>

    will be replaced by a blank text.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Summary not to show fields higher than 0’ is closed to new replies.