Solved

Add new start_form fields via api

  • 17 November 2020
  • 6 replies
  • 170 views

Userlevel 5


Is it possible to add start_form fields via the api?

icon

Best answer by Nicole Chiroli 17 November 2020, 19:24

View original

6 replies

Userlevel 7
Badge +10

Hello @Amanda L., how are you doing?

It is :) You can use something like this:

mutation{
createPhaseField(input:{ 
phase_id:”id of the start form phase
  type: "type of the field"
      label: "label of the field"
      options: ["Yes", "No"] (if applicable)
      description: "description of the field"
      required: true  (if applicable)
      editable: false (if applicable)
    }
  ) {
    phase_field {
      id
      label
    }
  }
}

If you have any other questions let me know! :)
 

Userlevel 2

Hi @Nicole Chiroli,

 

Please can you clarify where to find the start form id?

 

thanks :)

Userlevel 7
Badge +8

@jon71you find the start form id in the URL bar in three steps as follows:

 

or, written out:

 

  1. 1. Edit any phase
  2. 2. Click on the “Start Form”
  3. 3. Choose any of the start form fields
  4. 4. Copy the phase id from the URL
Userlevel 7
Badge +9

@Janaina_Barreto sobre o que conversamos hoje mais cedo. :point_up_2:

Userlevel 2

Ola @Juliana Spinardi e @Nicole Chiroli - acho que isto deve ter mudado pois nao consigo acessar uma URL que mostre o phase id do start_form. Estou tentando fazer a criacao de campos no start_form via the GraphQL API para evitar o trabalho manual de criar 50 campos. Grato, Alex

Userlevel 2

Managed to get the startFormPhaseId executing this graphql query (where xxx is the pipe id.


{
  pipe(id: XXXXXX) {
    startFormPhaseId
  }
}
 

Reply