# SendForm

TIP

  • sendForm(<player>, <form_data>, <response_variable>)
  • Sends a form to a player, to read about forms and what data you need to pass to the <form_data> parameter and what the response data will be, click here.
  • Once the player responds to the form, the variable that you pass to the third parameter will be defined as what the player responded.

# Parameters

  • <player> The player to send the form to as string
  • <form_data> The data of the form as array
  • <response_variable> The variable that will be defined as the response of the form

# Example

1: $data$['type'] = 'form'
2: $data$['title'] = 'Title of form'
3: $data$['content'] = 'The content of the form'
4: $button1$['text'] = 'First button'
5: $button1$['image'] = array('type' => 'url', 'data' => 'https://images.pexels.com/photos/3214311/pexels-photo-3214311.jpeg')
6: $data$['buttons'][] = $button1$
7: $data$['buttons'][] = array('text' => 'Second button')
8: sendForm($player$, $data$, $response$)
9: sendMessage($player$, 'Response: ' + $response$)