I’m having trouble with
The Wix Spaces SMS Invite widget always defaults to +1 (United States) as the country code. My entire audience is Brazilian, so users must manually scroll through hundreds of unsorted countries to find Brazil (+55). Additionally, when the correct country is selected and the SMS is sent, we receive the error: “An error occurred sending the link. Try again” — suggesting Brazil (+55) may not be supported at all.
Working in
Wix Editor with Velo (Dev Mode) — Spaces/Members App widget (presetsWidget1) with SMS Invite Link option enabled.
Site link
https://www.geid.org.br/app-geid
What I’m trying to do
- Set Brazil (+55) as the default country code in the SMS Invite widget.
- Successfully send an SMS invite link to a Brazilian phone number (+55).
What I’ve tried so far
Since we use Velo, I attempted to manipulate the dropdown via page code using MutationObserver to detect and force-select Brazil (+55) in the DOM:
$w.onReady(function () {
function trySetBrazil() {
const selects = document.querySelectorAll('select');
for (const sel of selects) {
const options = Array.from(sel.options);
const brazil = options.find(o =>
o.value === 'BR' || o.value === '+55' ||
o.text.includes('+55') || o.text.includes('Brazil')
);
if (brazil) {
sel.value = brazil.value;
sel.dispatchEvent(new Event('change', { bubbles: true }));
sel.dispatchEvent(new Event('input', { bubbles: true }));
return true;
}
}
return false;
}
const observer = new MutationObserver(() => {
if (trySetBrazil()) observer.disconnect();
});
observer.observe(document.body, { childList: true, subtree: true });
setTimeout(() => observer.disconnect(), 10000);
});
The code did not work. After investigation, I concluded the widget renders inside an isolated iframe, making DOM manipulation impossible from the parent page via Velo.
Extra context
Two separate issues that may be related:
- Default country: No configuration option exists in the widget settings to define a default country code.
- SMS not working for Brazil: Even when manually selecting +55 and entering a valid Brazilian number (e.g. +55 21 99715-1720), the widget returns the error “An error occurred sending the link. Try again” — which raises the question of whether Brazil is even supported as a destination country for Wix Spaces SMS invites.
Is Brazil (+55) supported by the Wix Spaces SMS service? If not, is there a list of supported countries? And is there any Velo API or widget property that allows setting the default country code?