Jump to content
  • 0

Autofill From Url?


pilotexpressions

Question

Hi everyone,

 

I am looking to assign a unique URL to my customers that when entered into a web browser will take them to one of my deployed datapages and autofill one of the fields to access the data page. Basically I think I need it to insert a record, however, I do not know how to build a URL to allow this. 

 

In other words, I want it to go to "mywebsite.com" and fill in a field such as "User ID" (User_ID being one of my parameters).

 

Any ideas on how I can achieve this?

 

Thanks!

 

Logan

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi Logan,

 

As I understood you'd like to provide particular users with the access to datapages.

I think, for this case works perfectly user redirection, based on the user type.

After user logins, he is redirected to the datapages that you let him access, also you'll be able to grab a user ID to the datapage from authentication field.

 

Take a look at the article: http://howto.caspio.com/tech-tips-and-articles/common-customizations/create-user-specific-redirect-after-login/

Also a training video is available: http://howto.caspio.com/getting-started/create-user-specific-redirect-after-login/

 

Hope it helps.

Matilda

Link to comment
Share on other sites

  • 0

Hi Logan,

 

I'm glad that links were useful :)

 

Here is the link with info about passing parameters as query string values: 

http://howto.caspio.com/parameters/parameters-as-query-string-values/

 

For example you can create a following link:

<a href="http://www.yourdomain.com/page.html?User_ID=[@field:User_ID]">Click me</a>

 

 

Does it work for you?

Link to comment
Share on other sites

  • 0

Thanks Matilda,

 

But I am still having trouble. I've read that page a hundred times and still can't figure out why I can't get the field to auto populate using the query string.

 

I built my string like this example:

 

http://www.mysite.com.php?User_ID=123456

 

However nothing populates. The page is deployed on my website and I have the cursor focusing on the field I want to populate. Do I need to build some sort of script to get this to work?

 

Thanks,

 

Logan

Link to comment
Share on other sites

  • 0

Hi Logan,

 

http://www.mysite.com.php?User_ID=123456

 

 

 

I think, better to take an ID from the field, because this value is unique for each user. 

 

 http://www.mysite.com.php?User_ID=[@field:User_ID]

 

1. You should have a table with info about your users: UserID, Name, Email, Password, etc.

2. Create password protection for your form. Refer to the video: http://howto.caspio.com/getting-started/password-protection/password-protection-1-of-3-lookup-and-authentication-tables/

3. Create a submission form. A source table for this form should contain UserID field. In the submission form make this field hidden and onload receive parameters from authenticated field. Please take a look at the screenshot.

 

So, you give a link to a user. The user opens a link and should login to reach the form. When user submits form, an user_ID will be taken from the authentication field and will be written in the table automatically along with newly submitted data.

 

Here is a good video about passing parameters: http://howto.caspio.com/pre-recorded-live-training/database-relationships-and-passing-parameters/

 

I hope this helps.

Let me know, if you have questions.

Link to comment
Share on other sites

  • 0

The reason I wanted to build it this way is because I want to issue an NFC device that when touched will take them to the data page deployed on my website and have one of the text fields populate automatically with their ID so they did not have to type it in manually. I was going to embed the NFC chip with a URL that had a query string with their User ID. Problem is when I build the string as directed in the tutorial and replace [@field:User_ID] with their actual ID number, it doesn't populate the field. I don't know what I'm doing wrong but I still can't get it to work.

 

Is their a better way to accomplish what I want it to do? I understand using authentication, but I am trying to not use authentication in this particular application.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...