2

I am trying to implement a hidden field to my registration form which would hold an invitation token so I could track whether a user registered via a referral.

I am trying to populate the hidden field from a query string, which looks something like http://app.dev/register?token=nb87asd7.

The issue I am facing is that the hidden field does not get populated with said query string. Furthermore, it worked a couple of times but then just stopped working all together.

The code I am trying to utilise:

Blade template file:

<input name="inviteToken" type="hidden" v-model="registerForm.inviteToken">

Vue.js file:

Spark.forms.register = {
  inviteToken: URI(document.URL).query(true).token
};

var app = new Vue({
    mixins: [require('spark')]
});

As I mentioned, this was working for a couple of times but then stopped populating the hidden field. I am using Laravel Spark v4.

Any help on this subject would be much appreciated.

Lemoncide
  • 79
  • 1
  • 7

0 Answers0