Right now, I’m working on a website for a client.
When I want to book a slot, now I need t choose a country code every time I place an order. For instance, I can pick here “+49”.
But the problem is all of my customers are from Germany, so the option +49 needs to be preselected.
How can I achieve this?
Kommt drauf an welches Element du da verwendest!
Is it a custom-element? Or is it a Wix-Form.
Grab the ID of this element, or the id of one of the input-elements and generate your code, to prefil the inputs with your wished data you want.
$w.onReady(()=>{
$w('#input1').value = "+49";
});
If you are using a DATASET, it already gets a little bit more difficult.
But still duable… (in this case an example with a DYNAMIC-DATASET → connected to a dynamic page).
$w.onReady(()=>{
$w('#dynamicDataset').onReady(()=>{
let curItem = $w('#dynamicDataset').getCurrentItem();
let title = curItem.title
let ID = curItem._id
console.log(title);
console.log(ID);
});
$w('#input1').value = "+49";
});
But if you are using already predefined stuff like wix-forms, you will have to go another way.
Hey, thanks for your Antwort!
I’m using the default Wix-forms, so it’s predefined.
Another question is how do I find an id for this form? Or does it have to be field-specific?
If you are using predefined stuff → in your case → Wix-Forms <— your way will be the following…
https://www.wix.com/velo/reference/wix-crm/$w-wixforms/introduction
I’ll give it a go, thanks a lot!
Hi, I’m just wondering if you have resolved this issue and if you did can you please tell me how you did? And if you may email me the process at muzahmi411@gmail.com
1 Like
Hi ,are you resolved this???plz can you explain me…
My eamil id is janvisampark@gmail.com
Hi,are you resolved this ,please explain me
Email id- janvisampark@gmail.com