iam using a form in my vue js app.And the form is from my main website, so that i am including the same form using
"vue-friendly-iframe": "^0.20.0",
for that i added
<vue-friendly-iframe src="url" @load="afterLoad()" id="formFrame"></vue-friendly-iframe>
and the url replaces my original form url.The form is loading perfectly.
so next i want to add my logged in user id to the form's hidden user if textfield after page load. so i added
@load="afterLoad()"
and
afterLoad(){
console.log("setting user token");
var formFrame=document.getElementById("formFrame");
if(formFrame)
formFrame.document.getElementById("accessories-form").user_id.value = this.$token;
}
But i couldnt set the user id.How can i do that.Thanks in advance
And my vue js app is hosted in subdomain whereas actual forms are hosted in the primary domain