olark.configure('system.ask_for_phone', 'hidden' );

Arguments

  • hidden
    hidden field
  • optional
    optional field
  • required
    required field

Notes

Require visitors fill out their phone number in the pre-chat survey before chatting. This requires the pre-chat survey to be enabled first.

This setting can also be enabled on the pre-chat survey section of the Text & Forms settings page.

You can read more about using the pre-chat survey in our Help Center.

Even if the pre-chat survey is enabled in your settings, you would need to enable the plugin using this line to use the system.ask_for_phone API call:

olark.configure("features.prechat_survey", true);