Skip to main content

Advanced Features

GeniusForms supports powerful conditional logic, scoring rules, and time-based controls for building dynamic forms.

Conditional Logic

Show or hide questions based on previous answers.

Simple Conditions

Show a question only when another question has a specific answer:
curl -X POST https://geniusforms.ai/api/v1/forms/208/fields \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "text",
    "question": "Please specify your other preference",
    "required": true,
    "conditionalLogic": {
      "showIf": {
        "questionId": 1,
        "operator": "equals",
        "value": "Other"
      }
    }
  }'
Available Operators:
OperatorDescription
equalsExact match
not_equalsDoes not match

Advanced Conditions

For complex logic with multiple conditions, AND/OR groups, and actions:
{
  "type": "textarea",
  "question": "Tell us more about your enterprise needs",
  "required": false,
  "conditionalLogic": {
    "advanced": {
      "conditionGroups": [
        {
          "id": "enterprise-check",
          "operator": "AND",
          "conditions": [
            {
              "id": "cond1",
              "questionId": 1,
              "operator": "equals",
              "value": "Enterprise",
              "valueType": "static"
            },
            {
              "id": "cond2",
              "questionId": 2,
              "operator": "greater_than",
              "value": 100,
              "valueType": "static"
            }
          ]
        }
      ],
      "actions": [
        {
          "type": "show_question",
          "targetId": 5
        }
      ]
    }
  }
}
Advanced Operators:
OperatorDescription
equalsExact match
not_equalsDoes not match
containsContains substring
greater_thanNumeric comparison
less_thanNumeric comparison
is_emptyField is empty
is_not_emptyField has value
Actions:
ActionDescription
show_questionDisplay a hidden question
hide_questionHide a visible question
skip_to_sectionJump to a form section
skip_to_questionJump to a specific question
end_formSubmit and end the form
set_scoreSet a score value

Scoring Rules

Calculate scores based on user answers — useful for quizzes, assessments, and lead qualification.
{
  "conditionalLogic": {
    "advanced": {
      "scoreRules": [
        {
          "id": "satisfaction-score",
          "questionId": 3,
          "scoreMap": {
            "Very Satisfied": 10,
            "Satisfied": 7,
            "Neutral": 5,
            "Dissatisfied": 2,
            "Very Dissatisfied": 0
          },
          "resetOnSection": false
        }
      ]
    }
  }
}

Time-Based Rules

Control question visibility based on time conditions:
{
  "conditionalLogic": {
    "advanced": {
      "timeRules": [
        {
          "id": "limited-offer",
          "type": "date_range",
          "startDate": "2026-02-01T00:00:00Z",
          "endDate": "2026-02-28T23:59:59Z"
        }
      ]
    }
  }
}
Time Rule Types:
TypeDescription
specific_dateShow on a specific date
date_rangeShow within date range
time_of_dayShow during specific hours
day_of_weekShow on specific days
time_on_formAfter X time on form
time_on_questionAfter X time on question

Complete Example: Lead Qualification Form

curl -X POST https://geniusforms.ai/api/v1/forms \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Lead Qualification",
    "description": "Qualify incoming leads",
    "questions": [
      {
        "type": "select",
        "question": "Company size",
        "options": ["1-10", "11-50", "51-200", "201-1000", "1000+"],
        "required": true
      },
      {
        "type": "select",
        "question": "Annual budget",
        "options": ["< $10k", "$10k-$50k", "$50k-$100k", "$100k+"],
        "required": true
      },
      {
        "type": "select",
        "question": "Timeline",
        "options": ["Immediately", "1-3 months", "3-6 months", "6+ months"],
        "required": true
      }
    ]
  }'
Then add a conditional follow-up for enterprise leads:
curl -X POST https://geniusforms.ai/api/v1/forms/FORM_ID/fields \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "textarea",
    "question": "Describe your enterprise requirements",
    "required": false,
    "conditionalLogic": {
      "advanced": {
        "conditionGroups": [
          {
            "id": "high-value-lead",
            "operator": "AND",
            "conditions": [
              {
                "id": "c1",
                "questionId": 1,
                "operator": "equals",
                "value": "1000+",
                "valueType": "static"
              },
              {
                "id": "c2",
                "questionId": 2,
                "operator": "equals",
                "value": "$100k+",
                "valueType": "static"
              }
            ]
          }
        ]
      }
    }
  }'