LogoLogo
Back to studio
  • 🧠Core Concepts
    • Introduction to Formsort
    • Formsort quickstart guides
      • Add content and collect answers
      • Capture demographic data
      • Add informational content
      • Template your variables
      • Add conditional logic
      • Using conditional logic with Calculated and API variables
      • Add a scheduling option
      • End the flow
      • Review your variable schema
      • Set up integrations
    • How data works in Formsort
      • Responder UUIDs
    • Understanding flows
    • Versioning in Formsort (Deploying)
      • Variant revisions
      • Managing revisions
  • ✨Creating Flows
    • Building a new flow
      • Groups
      • Steps
      • Copy-pasting form content
  • Adding questions and content
    • Questions
      • Select
      • Text
      • Address
      • Comparison
      • Confirmation
      • Date
      • Date & time
      • Email address
      • File upload
      • Grid choice
      • Iframe
      • Image upload
      • Number
      • Payment
      • Phone number
      • Postal code
      • Question group
      • Region
      • Signature
      • SSN
      • Yes/No
    • Content
      • Statement
      • Image
      • Next button
      • Video
      • Divider
      • Map
  • Controlling the flow with conditions and logic
    • Advanced logic
  • Variable templating
  • Redirects and endings
  • Field validation
  • Flow and variant management
  • Content library
  • 🧬JSON Form Definition
  • JSON schemas
  • Validating flow schemas
  • Events subscriptions
  • Flow content data format
  • 🎨Styling
    • Customizing appearance
      • Content area & form layout
      • Buttons
      • Typography
      • UI states
      • Color and dimension variables
      • Question containers
      • Inputs and dropdowns
      • Checkmarks
      • Tables
      • Sliders
      • Divider lines
      • Progress bar
      • Comparison cards
      • Animations and transitions
  • CSS & Advanced Styling
    • Custom CSS overrides
    • Step styling
    • CSS reference
  • 🔁Form Behavior Settings
    • Variant settings
      • Form behavior for returning users
      • Group ranking API
    • Navigation sidebar
  • ⚙️Response Data Collection & Management
    • Schema (variables)
      • Variables from questions
      • Externally provided variables
      • Calculated variables
      • API lookups
      • System Library variables
      • Orphaned variables
  • Saving & retrieving responses
  • Importing Data
    • URL parameters
    • POST body
    • Embed query parameters
  • 📊Analytics and Attribution
    • Built-in analytics
    • Split testing
  • 🚀Publishing and Deployment
    • Live preview overview
    • Environments
      • Loading different environments
    • Embedding
      • Web-embed API
        • React-embed
      • Adding authentication
      • Embedding forms in iOS and Android
      • Setting up a dev environment
    • Pre-deployment checklist
  • 📁Workspace Management
    • Accounts
      • Roles and permissions
    • Custom domains
    • Workspace domain detection
  • 🛠️Formsort Admin API
    • Admin API
  • 🔌Integrations
    • Form answers and events
      • Analytics events
      • Signed requests
      • Event payload shape
      • Submission frequencies
      • Runtime error reporting
    • Integration reference
      • Amplitude
        • Amplitude cross domain tracking
      • BigQuery
      • FullStory
      • Google Analytics
        • Updating from Universal Analytics to GA4
      • Google Cloud Storage
      • Google Sheets
      • Google Tag Manager (GTM)
        • JavaScript triggered by flow events
      • Hubspot
      • Jornaya
      • Optimizely
      • PostgreSQL
      • Redshift
      • Rudderstack
      • S3
      • Salesforce
      • Segment
        • Segment Setup
        • Segment cross domain tracking
      • Stripe
      • TrustedForm
      • Webhooks
        • Zapier
Powered by GitBook
On this page
  • Using compound answers in templated strings
  • Using compound answers in conditional logic
  • Repeating question group answers
  • Conditional fields
  • Layout in compound questions
  • Copy-pasting compound questions
  • Setting compound answers via URL parameter

Was this helpful?

  1. Adding questions and content
  2. Questions

Question group

Collects answers that consist of multiple fields. Allows for repeating set of sub-questions.

PreviousPostal codeNextRegion

Last updated 22 hours ago

Was this helpful?

For complex data sets, nest sub-questions within main questions to create hierarchical structures. By doing this, you can easily analyze data about specific medications, including dosages, or family health conditions that affect siblings and parents. Repeat this question multiple times (unlimited, fixed number, or based on another variable answer) so responders can enter information as many times as they need.

Unlike most answers, a compound answer value is stored as an object, since it contains multiple parts.

{
	"emergencyContact": {
		"name": "John",
		"lastName": "Doe",
		"email": "john@doe.com"
		"phone": "2345..."
	}
}

Using compound answers in templated strings

If you would like to access one of the parts of a compound in a string template, you can use the get .

e.g.

We'll call {{emergencyContact | get 'phone'}} in case of emergency. would render We'll call 2345... in case of emergency.

Using compound answers in conditional logic

In the conditional logic editor, you can select fields of a compound question to conditionally show a question, step or question. e.g. If you want to show a boolean question “Renew insurance” when insurance is expired, you can set conditional logic as following.

Repeating question group answers

It is possible to submit multiple answers to a compound question. The repetition count can be set to three different options.

  • Unlimited: Responders can add as many answers as they want by clicking on +add in the flow itself.

  • Fixed number: Set a fixed number of answers for the responder to answer. e.g. 2 emergency contacts in an intake form.

  • Another answer/variable: Add a question prior to the compound question that will set the number of answers required in the compound question. e.g. First ask for the number of medicines or pass it via url, then use the compound question to ask for specific questions about the medicines as many times as set in the medication number question.

Repeating compound answers appear in form payload as array of objects. e.g.

{
	"numberOfMedicines": 2,
	"medicines": [
		{
			"name": "Medicine 1",
			"dailyDose": 2,
		},
		{
			"name": "Medicine 2",
			"dailyDose": 3,
		}
	]
}

Conditional fields

Fields (sub-questions) in a compound question can be shown based on other answers/variables just like regular questions. If you want to show a field based on other fields in the same compound question, you can set conditional logic in the logic editor. e.g. You have a compound question asking for work experience and you want to ask for “end date” only if the responder quit the job.

Layout in compound questions

You can have multiple fields in a row in a compound question — just like other questions in a step. You can drag/drop and reorder fields. We currently do not support moving fields in or out of a compound question.

Copy-pasting compound questions

You can copy and paste compound questions just like other questions, but currently, copying and pasting fields inside a compound question (sub-questions) is not supported.

Setting compound answers via URL parameter

If you'd like to pass a compound answer into the form instead of requiring the responder to answer a question, you can use object notation like in address answers. e.g.

https://your-flow-url.com?emergencyContact[name]=John+Doe&email=john@doe.com

Passing multiple compound answers via url is currently not supported. It will be addressed soon.

template function
Setting conditional logic based on compound fields
Setting repetition style
Setting conditional logic
End date disabled
End date enabled
Compound question layout