Hello everybody,
Please need the help of the community I created a form using WixForm. This can be filled in and sent. But now I need a modification. Would like to fill out the form via URL.
www.mywix.com?firstname=Hallo &lastname=Test…
But unfortunately I have no plan which code to insert into the Java line.
Search for 3 days now, and now I wanted to ask for help. Would be great if someone can help me.
Thank you very much.
Philipp
Sry for translation (google)
J.D
October 28, 2020, 11:35pm
2
import wixLocation from 'wix-location';
const query = wixLocation.query;
const name = query.name;
$w.onReady(() => {
if(name){$w("#nameInput").value = name;}
})
Thank you very mutch.
It works fine.
Can I check a checkbox automatically with a URL command?
#$w(“checkbox1”)
Best regards
Philipp
J.D
October 29, 2020, 9:39am
4
@riedlchamp44835
Let’s say you have a URL like mysite.com?checkbox =true
and in your code write:
import wixLocation from 'wix-location';
const query = wixLocation.query;
const name = query.name;
const isChecked = query.checkbox === "true";
$w.onReady(() => {
if(name){$w("#nameInput").value = name;}
$w("#checkbox1").checked = isChecked;
})