Alpha Video Training
Results 1 to 3 of 3

Thread: Construct a URL to pre-populate fields on a UX

  1. #1
    Member
    Real Name
    Darren Parsons
    Join Date
    Aug 2015
    Posts
    182

    Default Construct a URL to pre-populate fields on a UX

    I have what should be a simple issue. I want to provide my users with a quick link to a UX that will pre-populate their email address in the form.

    Here's the base URL:

    https://anchorclimatecare-rqzquotelo...asoftware.com/

    The field is EmailAddress. Below are the attributes of the fiend when inspected with Chrome.

    <input type="text" id="SPLASHPAGE.V.R1.EMAILADDRESS" title="" class="GrGrayEdit" style="width: 100%; box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;" name="V.R1.EMAILADDRESS" value="" a5isdirty="false">

    Using the above I have tried:

    https://anchorclimatecare-rqzquotelo...mail@email.com

    and every other combination of the field name I can think of. Has anyone done this? It should be simple.

    Thanks in advance

  2. #2
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,749

    Default Re: Construct a URL to pre-populate fields on a UX

    Here is some basic code that'll get you there using page variables...

    The URL...
    Code:
    https://anchorclimatecare-rqzquotelookup.cloud.alphasoftware.com/?email=test@test.com
    Notice I added a question mark then email=test@test.com. The email part is the page variable and the rest is the variable data. If you wanted to pass two page variables you add a & then the next variable.


    In the UX's server-side onDialogInitialize event...
    Code:
    if variable_exists("request.variables.EMAIL") then
    	'var exists so do something
    	dim email as c = ""
    	    email = request.variables.EMAIL
    	
            'Maybe do some email validation here ...that's up to you.
    	
    	e.control.myEmailControlName = email
    else
    	'var doesn't exist so do something else or do nothing at all
    end if
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  3. #3
    Member
    Real Name
    Darren Parsons
    Join Date
    Aug 2015
    Posts
    182

    Default Re: Construct a URL to pre-populate fields on a UX

    Thanks Mike, that worked beautifully

Similar Threads

  1. Add new fields to existing table and populate just those fields with an import or append?
    By Hansolo in forum Application Server Version 11 - Web/Browser Applications
    Replies: 12
    Last Post: 06-21-2014, 11:37 PM
  2. question - which way is best to populate fields
    By SmartMLMer in forum Alpha Five Version 9 - Desktop Applications
    Replies: 20
    Last Post: 01-21-2013, 05:02 PM
  3. populate fields from an id field
    By villmx in forum Application Server Version 9 - Web/Browser Applications
    Replies: 1
    Last Post: 12-17-2008, 10:25 AM
  4. populate fields
    By ntaka in forum Alpha Five Version 8
    Replies: 7
    Last Post: 01-28-2008, 02:06 AM
  5. Populate fields
    By dennis vermeulen in forum Alpha Five Version 4
    Replies: 0
    Last Post: 07-26-2001, 07:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •