WordPress.org

Forums

Calculated Fields Form
[resolved] Dependency field has undesirable effect on summary field (4 posts)

  1. jlehrer
    Member
    Posted 9 months ago #

    On this form:

    http://venousdisease.com/dvt-risk-assessment-online-tool-2/

    at the bottom of the first page is a question asking for the user's gender. I have it set up to display three additional questions if the user selects female. If the user selects male, I have the field set up to do nothing.

    The problem: If the user selects MALE and continues with the survey, none of the fields following the male/female question appear in the summary. If, however you select female AND respond yes to at least one of the three following questions, ALL of the fields display properly in the form summary.

    Am I doing something wrong?

    https://wordpress.org/plugins/calculated-fields-form/

  2. codepeople
    Member
    Plugin Author

    Posted 9 months ago #

    Hi,

    I've detected and corrected the issue. Thanks, by your feedback.

    The most easy way to correct the issue is re-installing the plugin (don't worry, the process preserves the forms created previously)

    But if you prefer modify the code by yourself, follow the steps below:

    1. Open the 16_fbuilder.fsummary.js file, located in "/wp-content/plugins/calculated-fields-form/js/fields-public/16_fbuilder.fsummary.js", with the text editor your choice.

    2. Go to the snippet of code:

    str += '<div ref="'+p[i]+this.form_identifier+'" class="cff-summary-item"><span class="'+this.titleClassname+' cff-summary-title"></span><span class="'+this.valueClassname+' cff-summary-value"></span>';

    and modify it like follow:

    str += '<div ref="'+p[i]+this.form_identifier+'" class="cff-summary-item"><span class="'+this.titleClassname+' cff-summary-title"></span><span class="'+this.valueClassname+' cff-summary-value"></span></div>';

    That's all.
    Best regards.

  3. jlehrer
    Member
    Posted 9 months ago #

    Looks like the only change was to add a missing </div>, which I did, and it works now. I made the change directly to the code. When the next version of the plugin is released, will this small change be included?

    Thanks for your attention to this!

  4. codepeople
    Member
    Plugin Author

    Posted 9 months ago #

    Hi,

    The change was made before send you the answer. So, if you need update the extension, the change be included.

    Best regards.

Reply

You must log in to post.

About this Plugin

  • Calculated Fields Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.