Jordan Keyes
Jordan Keyes

Reputation: 1

using url variables for aweber field

I have been trying for a few hours to put a variable in my url such as ?ID=1478 and then have the number 1478 be filled into the field of a hidden aweber form

I can only use html. Does anyone know how I can do this?

Upvotes: 0

Views: 249

Answers (1)

Kaitlyn Chappell
Kaitlyn Chappell

Reputation: 56

You can add a hidden field to your sign up form as described here: https://help.aweber.com/hc/en-us/articles/204027956-How-do-I-add-a-hidden-field-to-my-sign-up-form-

From that article you can see you simply add a line to the form's HTML like this:

<input type="hidden" name="custom FIELDNAME" value="VALUE" />

You'd need to make the custom field in AWeber first, then replace "FIELDNAME" with whatever you called it in AWeber's list settings page. The value will be your ID number, such as 1478 in your example.

Generally you'd use a bit of JavaScript or PHP or somethihng to dynamically fill in that value. HTML by itself can't really do much dynamic stuff.

You could probably add an ID to the field:

<input type="hidden" name="custom FIELDNAME" value="VALUE" id="urlID"/>

Then use this bit of JS:

document.getElementById("urlID").value = "1478";

You'd need to have your JS function retrieve or generate the ID value of course. But you'd set the form value like that.

Once you have the custom field set for each subscriber, you can dynamically fill that value in your link by using a personalization variable in your AWeber message like so:

https://www.example.com/coolstuff?ID={!custom FIELDNAME}

Replace FIELDNAME with whatever you called the custom field.

Upvotes: 0

Related Questions