PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Conditional logic & form styling

  1. Battra
    Member

    Hi,

    I have a couple of questions about Gravity Forms features

    1) I want to collect information about customer's health details and need to show more detailed questions depending on the value they selected. For example:

    Which of the following conditions do you currently have?
    _ Diabetes
    (If someone tick 'Diabetes', display the following questions, otherwise hide them)
    When was it diagnosed? ____

    _ Heart problem
    (If someone tick 'Heart problem', display the following questions, otherwise hide them)
    Have you ever had heart attack? Yes/No
    (Further detailed question, only shown when the person tick 'Yes')
    When did you have the heart attack? ___

    … etc

    2) Can these sub-questions displayed in a form group which has custom style, e.g. use border for the group, use indentation, etc.

    3) Can I use my own CSS for the form? How about formatting the notification email whenever someone submit the form?

    4) Can I search using any fields? E.g. search people who has diabetes, search people who has diabetes AND heart problem, etc

    Posted 13 years ago on Friday February 4, 2011 | Permalink
  2. 1) Conditional Logic can accomplish this. You would have to add ALL the questions to your form and then use Conditional Logic to show/hide individual fields based on previous user selections.

    2) Yes, you could apply custom styles to those questions. However, you would have to write the CSS to do so. You can apply a custom class to a field and then target that class using CSS. You can also view source on the form and see what id's/classes are used by default and use them to target the fields with CSS. Gravity Forms uses standard HTML and CSS so you would style it just like any other page element.

    3) You can customize the form however you want with CSS. However, you will still want to use the base Gravity Forms stylesheet because the forms are entirely styled by CSS so if you don't output the Gravity Forms stylesheet you would have to handle all of the styling yourself. We recommend keeping the Gravity Forms CSS output turned on and simply adding custom styles to your theme stylesheet to override the default styles using CSS inheritance and targeting.

    4) Currently search capabilities are limited to a free form search box that searches all fields. There aren't currently any search filters. However, we do plan on implementing an Advanced Search capability in the future.

    Posted 13 years ago on Friday February 4, 2011 | Permalink
  3. Battra
    Member

    Thanks for your reply, Carl!

    Where do I put my custom CSS? Is it something that will be overriden when installing upgrade, or can be done without touching the core files?

    Does GF use FIELDSET tag?

    Posted 13 years ago on Friday February 4, 2011 | Permalink
  4. You would place your custom CSS in your themes stylesheet. If you edit the Gravity Forms plugin stylesheet your changes would get overwritten when an upgrade is executed, so it's best to place changes in your theme stylesheet.

    Gravity Forms does not currently use FieldSet. If you want to use FieldSet you can use the HTML field and implement it yourself if you know what you are doing with HTML.

    Posted 13 years ago on Friday February 4, 2011 | Permalink
  5. Here's an example of using the inline HTML blocks to create fieldset groupings in your forms.

    http://forum.gravityhelp.com/topic/fieldsets#post-17019

    Posted 13 years ago on Friday February 4, 2011 | Permalink