Hi everyone,
The bottom line is that I’m not very good at coding, and any help with this would be greatly appreciated. To give you some context, I’ll explain the issue below.
I recently asked this question:
I have a form in Wix Studio where users enter the type of furniture they need. Often, they include commas in their responses.
The issue is that I’m using Pabbly to send WhatsApp messages, and Pabbly treats commas as separate parameters. Because of this, messages fail to send properly whenever a user includes multiple options separated by commas.
I’m looking for a way to automatically replace commas with dots (.) when the form is submitted so that the data sent to Pabbly does not contain commas, allowing the messages to go through without errors.
Is there a way to modify the form’s code so that whenever a user enters a comma and submits the form, it is replaced with a dot before being sent to Pabbly via a webhook?
Any help would be greatly appreciated!
Thanks in advance!
I received a response from Tech_Voyager suggesting a solution to this issue:
You can solve this by using Velo (Wix’s coding platform) to modify the form submission before sending it to Pabbly. Add an onClick event to the submit button, and before sending the data, use JavaScript to replace all commas with dots:
$w(“#inputField”).value = $w(“#inputField”).value.replace(/,/g, “.”);
Then, send the modified value via your webhook. This ensures that user inputs are properly formatted, preventing errors in Pabbly’s parameter handling.
Could you guide me through exactly where and how I should add this code step by step?