How to Make a Custom Button Launch a Phone Call

Custom buttons in WS Form can be configured to perform a variety of actions using conditional logic, including launching a phone call.

Tutorial

In this tutorial, we’ll set up a custom button that initiates a phone call when clicked.

  1. Add the Custom Button to the form.
WS Form PRO - Custom Button - Redirect - Add Button
  1. Click the Conditional Logic icon at the top of the layout editor. The Conditional Logic sidebar will open.
  2. Click the Add  icon to add a new condition.
  3. Give the condition a name, e.g. ‘Button Click’
  4. Configure the condition as follows:
    1. IF [Button] [Clicked]
    2. THEN [Form] [Run JavaScript]
    WS Form - Custom Button - Launch Tel Phone - Conditional Logic
  5. In the JavaScript code editor, enter: Change the telephone number to whichever number you want the button to call. You should use an international format with no spaces or formatting, e.g. +15551231234
location.href='tel:+15551231234';
  1. Click Save & Close
  2. Preview the form to test your button.

Learn more about the tel: anchor: MDN Web Docs – <a>: The Anchor element