# Supported Question Types
This page outlines the various input question types used in the application, and examples and guidelines for implementation.
# Understanding inputType
The inputType property is a key aspect of the JSON object that represents a field of the form on a third-party website we mined. It serves two main purposes:
Field Representation: It indicates the type of input field that should be rendered on the frontend. For example, a question with
"inputType": "SelectOne"suggests that a dropdown menu should be used.Value Expectations: It dictates the type of value that the API expects as an answer to the question. For instance, a
SelectOneinput type expects a string value corresponding to the selected option.
# Examples of inputType Implementations
Text:
- JSON:
{ "inputType": "Text" } - Frontend Implementation:
<input type="text" /> - Expected Value: String
- JSON:
TextArea:
- JSON:
{ "inputType": "TextArea" } - Frontend Implementation:
<textarea></textarea> - Expected Value: String
- JSON:
SelectOne:
- JSON:
{ "inputType": "SelectOne", "conditionalQuestions": [], "options": [{ "answer": "Yes" }, { "answer": "No" }] } - Frontend Implementation:
<select> <option value="Yes">Yes</option> <option value="No">No</option> </select> - Expected Value: String (e.g.,
"Yes"or"No")
- JSON:
SelectMultiple:
- JSON:
{ "inputType": "SelectMultiple", "conditionalQuestions": [],"options": [{ "answer": "Option 1" }, { "answer": "Option 2" }] } - Frontend Implementation:
<input type="checkbox" value="Option 1"> Option 1<br> <input type="checkbox" value="Option 2"> Option 2<br> - Expected Value: Array of Strings (e.g.,
["Option 1", "Option 2"])
- JSON:
Boolean:
- JSON:
{ "inputType": "Boolean" } - Frontend Implementation:
<input type="radio" name="boolean" value="true">Yes<br> <input type="radio" name="boolean" value="false">No<br> - Expected Value: Boolean (e.g.,
trueorfalse)
- JSON:
File:
- JSON:
{ "inputType": "File" } - Frontend Implementation:
<input type="file" /> - Expected Value: File object
- JSON:
# Input Types
| Input Type | Description |
|---|---|
| Text | A text input field. |
| TextArea | A multiple-line text input field. |
| TextLiteral | Static text often used for informational purposes, formatted with HTML where necessary. |
| SelectOne | Single-choice dropdown or radio button selection, with available answers in options and possible follow-up questions in conditionalQuestions. |
| SelectMultiple | Multiple-choice selection, storing choices in options with any dependent questions in conditionalQuestions. |
| Date | A date input field. |
| Boolean | A boolean input field. |
| File | A file upload field. |
| ArrayOfObjects | An array of arrays of objects relating to repeatable questions on the job post, e.g., a list of previous experience, each with repeatable questions. Example: "Please list your previous job experiences, including job title, company, and duration." |
| FragmentedQuestion | An array of objects relating to a single set of answers. Example: "What is your availability for the next month? Please specify days and times." |
# Advanced Types
# Conditional Questions
Conditional questions are those that depend on the answer to a previous question. For example, if a user selects "Yes" to a question, a follow-up question may appear asking for more details. These can also be nested.
Example of a Conditional Question:
{
"question": "Do you have any previous work experience?",
"id": "previous-work-experience",
"inputType": "SelectOne",
"label": "Work Experience",
"mandatory": true,
"options": [
{
"answer": "Yes",
"conditionalQuestions": [
{
"question": "Please describe your previous work experience.",
"id": "work-experience-description",
"inputType": "Text",
"mandatory": true
}
]
},
{
"answer": "No",
"conditionalQuestions": [
{
"question": "Do you have other experience?",
"id": "other-experience",
"inputType": "SelectOne",
"mandatory": true,
"options": [
{
"answer": "Yes",
"conditionalQuestions": [
{
"question": "Please describe your experience.",
"id": "other-experience-description",
"inputType": "Text",
"mandatory": true
}
]
},
{
"answer": "No",
"conditionalQuestions": []
}
]
}
]
}
],
}
# Example Apply Request
The expected format for answers is an array of objects, where each object contains an id and a value formatted according to the question's inputType.
[
{ "id": "previous-work-experience", "value": "Yes" },
{ "id": "work-experience-description", "value": "Worked as a chef" }
]
OR
[
{ "id": "previous-work-experience", "value": "No" },
{ "id": "other-experience", "value": "Yes" },
{ "id": "other-experience-description", "value": "Cook lots at home" }
]
# Handling Special Cases
- Optional questions: If a question is marked as
"mandatory": false, it can be omitted from the/applypayload. - Validation rules: Ensure correct data types for answers.
- Date & number formats: Follow ISO-8601 for dates (YYYY-MM-DD) and plain numbers for salary expectations.
# Array Of Objects Questions
Array Of Objects questions are those that have multiple sections to the same question, for example a list of previous experience, each with repeatable questions.
Example of an Array Of Objects Question:
{
"question": "Previous Work Experience",
"id": "previous-work-experience",
"inputType": "ArrayOfObjects",
"label": "Work Experience",
"mandatory": true,
"options": [
{
"question": "Job Title",
"id": "previous-work-experience-job-title",
"inputType": "Text",
"label": "Work Experience",
"mandatory": true
},
{
"question": "Company",
"id": "previous-work-experience-company",
"inputType": "Text",
"label": "Work Experience",
"mandatory": true
}
]
}
# Example Apply Request
The expected format for answers is an array of objects where each object contains an id and a value formatted according to the question's inputType. The value of these objects is then an array of arrays of objects with the same format:
{
"id": "previous-work-experience",
"value":
[
[
{ "id": "previous-work-experience-job-title", "value": "Software Engineer" }
{ "id": "previous-work-experience-company", "value": "Company A" }
],
[
{ "id": "previous-work-experience-job-title", "value": "Project Manager" }
{ "id": "previous-work-experience-company", "value": "Company B" }
],
[
{ "id": "previous-work-experience-job-title", "value": "Intern" }
{ "id": "previous-work-experience-company", "value": "Company C" }
]
]
}
# Handling Special Cases
- Optional questions: If a question is marked as
"mandatory": false, it can be omitted from the/applypayload. If the parent question (inputTypeArrayOfObjects) is not mandatory, nothing needs to be answered, even if one or more of the questions inside of it are mandatory. - Validation rules: Ensure correct data types for answers.
- Date & number formats: Follow ISO-8601 for dates (YYYY-MM-DD) and plain numbers for salary expectations.
# Fragmented Questions
Similar to Array Of Objects, but only expects one set of answers. Example: "What is your availability for the next month? Please specify days and times."
Fragmented Question:
{
"question": "What is your availability?",
"id": "availability",
"inputType": "FragmentedQuestion",
"label": "Availability",
"mandatory": true,
"options": [
{
"question": "Day",
"id": "first-availability",
"inputType": "Date",
"label": "Available Day",
"mandatory": true
},
{
"question": "Day",
"id": "second-availability",
"inputType": "Date",
"label": "Available Day",
"mandatory": false
},
]
}
# Example Apply Request
The expected format for answers is an array of objects, where each object contains an id and a value formatted according to the question's inputType.
{
"id": "availability",
"value":
[
{ "id": "first-availability", "value": "2025-10-07" }
{ "id": "second-availability", "value": "2025-10-08" }
]
}
# Handling Special Cases
- Optional questions: If a question is marked as
"mandatory": false, it can be omitted from the/applypayload. If the parent question (inputTypeFragmentedQuestion) is not mandatory, nothing needs to be answered, even if one or more of the questions inside of it are mandatory. - Validation rules: Ensure correct data types for answers.
- Date & number formats: Follow ISO-8601 for dates (YYYY-MM-DD) and plain numbers for salary expectations.