A five-minute introduction to writing surveys with SRP. No coding experience required.

01What Is SRP?

SRP is a plain-text language for writing surveys and forms. You describe your questions in a readable text file and SRP turns that file into a working, interactive survey.

Think of it the way you might think of Markdown for documents: a lightweight syntax that stays out of your way. Here is the key thing: an SRP file is just a text file. You write it in any text editor (Notepad, VS Code, TextEdit, anything), save it with a .srp extension, and you are done. There is nothing to install, no drag-and-drop builder to learn, no proprietary format to deal with.

Because it is plain text, you can:

  • Share it — email it, paste it into a message, drop it in a shared folder
  • Version it — store it in Git and see exactly what changed between drafts
  • Copy blocks — reuse a question or page from a previous survey in seconds
  • Review it — a colleague can read the file and understand the whole survey at a glance

Try it now: The SRP Playground at srpsurveys.com/playground has a built-in editor on the left and a live logic diagram on the right that updates as you type. One click away is a fully rendered survey you can move through exactly as a respondent would. The feedback between write and interact is almost instant. No account needed.

02Your First Survey

Here is the smallest useful survey you can write:

srp
page "feedback" do
  title "Quick Feedback"

  SingleSelect "experience" do
    text "How was your experience today?"

    option "Great"
    option "It was okay"
    option "Not good"
  end

  action :complete
end

That's it — a real, working survey. Here is what each line does:

  • page "feedback" do … end — a page block. The name in quotes ("feedback") is an internal identifier. It never appears on screen; you use it when you need to refer to this page in logic.
  • title "Quick Feedback" — the heading shown to the respondent. Every page needs one.
  • SingleSelect "experience" do … end — a question block. SingleSelect is the type (radio buttons). "experience" is the unique name for this question.
  • text "…" — the question text shown to the respondent.
  • option "…" — one answer choice. Add as many as you need.
  • action :complete — when the respondent submits this page, the survey is done.

Names must be unique. Every page and every question has a name in quotes. These names are internal identifiers — keep them short, lowercase, and distinct: "q1_age", "brand_awareness", "open_feedback".

03More Question Types

SRP has many question types. You will use a handful of them for most surveys. Here are the most common ones with short examples.

SingleSelect

Pick one answer — radio buttons

MultiSelect

Pick multiple answers — checkboxes

OpenEnded

Single-line free text

Discussion

Multi-line text area

Rating

Star or numeric scale

NPS

0–10 Net Promoter Score

Dropdown

Select from a long list

Notification

Display text, no input

Each question type follows the same pattern: the type name, a unique question name in quotes, and a do … end block containing the question's properties.

srp
page "about_you" do
  title "A Bit About You"

  # Free-text input
  OpenEnded "job_title" do
    text "What is your job title?"
    required
  end

  # Checkboxes — let respondents pick multiple answers
  MultiSelect "interests" do
    text "Which topics interest you? Select all that apply."
    min_selections 1

    option "Technology"
    option "Health & Wellness"
    option "Finance"
    option "Travel"
    option "Food & Cooking"
  end

  # Star rating
  Rating "overall_rating" do
    text "How would you rate your experience?"
    number_of_ranks 5
    required
  end

  action :complete
end

A couple of things worth noting:

  • required — makes a question mandatory. Just add it on its own line inside the question block.
  • min_selections 1 — for MultiSelect, require at least one choice to be selected.
  • Lines starting with # are comments — ignored by SRP, useful for your own notes.

04Multiple Pages

A survey is a sequence of pages. Respondents move through them in the order they appear in the file. Just add more page blocks — each with its own title and questions.

srp
page "welcome" do
  title "Welcome!"

  # Notification shows text without asking for input — great for introductions
  Notification "intro" do
    text "This short survey takes about 2 minutes. Thank you for your time."
  end
end

page "your_opinion" do
  title "Your Opinion"

  SingleSelect "satisfaction" do
    text "How satisfied are you with our product overall?"
    required

    option "Very satisfied"
    option "Satisfied"
    option "Neutral"
    option "Dissatisfied"
    option "Very dissatisfied"
  end

  Discussion "feedback" do
    text "Is there anything specific you would like us to improve?"
  end

  action :complete
end

Pages without an action automatically flow to the next page in the file. Only the last page (or any page that should end the survey) needs action :complete.

Storing coded values. If your analysis expects numeric scores rather than text labels, add code_as to any option. The respondent sees the label; the stored and synced value is the number:

srp
  option "Very satisfied",    code_as: 5
  option "Satisfied",         code_as: 4
  option "Neutral",           code_as: 3
  option "Dissatisfied",      code_as: 2
  option "Very dissatisfied", code_as: 1

05Routing Respondents

You rarely need everyone to answer every question. SRP lets you send respondents to different pages based on their answers — or end the survey early — using action inside an option block.

srp
page "purchase_check" do
  title "Recent Purchase"

  SingleSelect "made_purchase" do
    text "Have you made a purchase with us in the last 90 days?"
    required

    option "Yes" do
      action :skip_to, "purchase_questions"
    end

    option "No" do
      action :skip_to, "general_feedback"
    end
  end
end

page "purchase_questions" do
  title "About Your Purchase"

  Rating "purchase_sat" do
    text "How satisfied were you with your most recent purchase?"
    number_of_ranks 5
    required
  end

  action :complete
end

page "general_feedback" do
  title "General Feedback"

  Discussion "thoughts" do
    text "What would encourage you to make a purchase with us?"
  end

  action :complete
end

Respondents who answered "Yes" see the purchase questions. Everyone else skips straight to general feedback. Pages that are skipped are simply not shown.

See your routing take shape in real time. The playground updates a logic flow diagram as you write — every page and branch visible at a glance. When you are ready to walk the paths yourself, one click renders the full survey so you can experience it exactly as a respondent would.

Two other useful actions at the page level:

  • action :terminate — ends the survey and marks the respondent as disqualified. Use this in screener surveys to screen out respondents who don't meet your criteria.
  • action :complete — ends the survey successfully. Can appear in any page, not just the last one.

Going further with conditions: SRP also supports segments — you can tag respondents based on their answers (segment "power_user") and then show pages or questions only to people in that segment (show_only_if "power_user"). The SRP Survey Usage Guide covers these topics and more in depth.

06What's Next

You now have everything you need to write a working survey. A quick recap:

  • A survey is a sequence of page blocks, each with a title.
  • Questions go inside pages. Each has a type, a unique name, and text.
  • action :skip_to, "page_name" inside an option routes the respondent to that page.
  • action :complete ends the survey. action :terminate disqualifies.
  • The .srp file is plain text — write it anywhere, share it, version it.
  • srpsurveys.com/playground — write your survey, watch the logic diagram update live, then step through it as a respondent. The best place to experiment. No account needed.
  • SRP Survey Usage Guide — covers all of these topics and more in depth: every question type, attribute, conditional logic, segments, dynamic content, and best practices.
  • Getting Started for XForm/ODK — if you need to export your survey to ODK Collect, KoboToolbox, or another field data collection tool, this guide walks through the question types that map to XForm XML.

One question at a time. Paste the example from Section 2 into the playground. Add one question. Preview it. Add another. Most people have a working survey draft within 20 minutes of reading this page.