Skip to main content
A question is one element of a form. The welcome screen, logo, banners and submit button count as elements too. For fields and response details, see the API reference for question kinds, questions and adding a question. Changes made with these commands are saved in the form’s draft. Respondents do not see them until you run neetoform forms publish <form-id>. Reading a form with these commands shows the draft values.

List question kinds

This command lists the kinds of question you can add. For each kind it shows the attributes and lists the kind accepts, with their types and limits. Use this before questions create to learn which attribute names are valid.
Sample output (--json)
A kind with is_singular set to true, such as submit, can appear only once in a form. Payment kinds are not listed because they cannot be added with the CLI.

List questions

This command lists every element of a form in order, including the welcome screen, headings and the submit button. Use this when you want a question id.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
Sample output (--json)
state is draft until the form is published with this question, then published. has_draft_changes tells you the question has changes that are not published yet.

Show a question

This command shows one question with its current values, including changes that are not published yet.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
  • <question-id> - The question’s UUID, from neetoform forms questions list

Create a question

This command adds one question to a form. Use this when you need a single new question. To add many at once, use bulk-create.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
--kind is required. Without --position, the question is added just before the submit button. --label, --description, --placeholder and --required are shortcuts for the attributes of the same name. --json-file holds the attributes of the question as one JSON object. Use it for anything the shortcuts do not cover, such as the options of a dropdown. A flag overrides the same key in the file.
An attribute name that the kind does not accept is rejected. Run neetoform question-kinds list to see the valid names. The change stays in the draft until you publish.

Create several questions

This command adds several questions in one call. Use this to build a form quickly.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
--json-file is required. The file holds a questions list. Each item has a kind and, if needed, attributes and position.
The call is all or nothing. If one question is rejected, no question is added.

Update a question

This command changes the values of a question. Use this to rename a question, make it required or change its options. It also works for the welcome screen, logo, banner, submit button and progress bar. You cannot change the kind of a question.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
  • <question-id> - The question’s UUID, from neetoform forms questions list
--json-file works as it does on create: one JSON object of attributes, with flags overriding the same keys. A list such as options replaces the whole list, so send every option you want to keep. The change stays in the draft until you publish.

Delete a question

This command removes a question from the form’s draft.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
  • <question-id> - The question’s UUID, from neetoform forms questions list
Sample output
Some elements cannot be deleted, and the command prints the reason when that happens.

Clone a question

This command copies a question, including changes that are not published yet. The copy is placed right after the original.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
  • <question-id> - The question’s UUID, from neetoform forms questions list
A kind that is allowed only once in a form, such as the submit button, cannot be cloned.

Reorder questions

This command sets the order of all elements of a form. Use this to move questions around.
Required arguments:
  • <form-id> - The form’s UUID, from neetoform forms list
--ids must name every element of the form exactly once, including the logo, welcome screen and submit button. Keep the logo first. Take the ids from neetoform forms questions list. If the list is incomplete or has a repeat, the order is not applied.