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.
- Add the Custom Button to the form.
- Click the Conditional Logic icon at the top of the layout editor. The Conditional Logic sidebar will open.
- Click the Add icon to add a new condition.
- Give the condition a name, e.g. ‘Button Click’
- Configure the condition as follows:
- IF [Button] [Clicked]
- THEN [Form] [Run JavaScript]
- In the JavaScript code editor, enter:
location.href='tel:+15551231234';
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
- Click Save & Close
- Preview the form to test your button.
Learn more about the tel:
anchor: MDN Web Docs – <a>: The Anchor element