Search:  

Previous pageTechniques & KB Articles Next page
URL Parameter Regular Expressions 

URL Parameter Regular Expressions

This document describes the setting "URL parameter regular expression".

This setting is available in the Behavior Editor / Settings / General Options.

Purpose

There are some scenarios where a user reaches the site using an url, typically a form of DirectURL where part of the DirectURL is an unknown value, and you want to capture this value in a form field.

This setting allows you to define an regular expression to parse the URL, and store the value in a variable that can be used in a field.

Example:

Assume that we have a DirectURL defined that will bring all requests of the url:

www.example.com/abc/123/xyz

to a particular target page, but where xyz could be any set of letters

In this case we want to store the final set of letters (eg 'xyz') in our field.

To make the case more interesting, the 123 part is also variable, so our regular expression needs to handle that, but match the xyz part for our field.

Configure a regular expression for this setting with:

Pattern: abc/\d+/(.*)

Return (x) Input replaced with: $1

Then, you can embed a Data Entry Form or Sale View on the page, and for any field that accepts a Default value, enter as the default:

%url[1]

When the page is visited, the field will then be given the value retrieved by the regular expression.

 

           
 

DATA

Managing Data

Tables

Referential Integrity 

Data Entry Forms

Queries and Views

Custom Views

 

USERS & SECURITY

Users & Permissions

User Group Manager 

User Registration

Access Codes & Agreements

Personalizing Experience

Managing Profiles

 

SaaS

SaaS Server

SaaS Site Manager

SaaS Client Accounting

SaaS Templates & Clones

SaaS Self Service

Associates System 

 

CMS

User Editable pages

CSS Editor

Editing Pages

Direct URLs

Using Javascript & JQuery

Content Approval & Workflow

 

WEB

Key Concepts

Components

Understanding Embeds

Site Building

Themes System

SEO Optimization

 
           
 
clearString   neatComponents™    © Enstar LLC  1999-2019 All Rights Reserved      Terms of Use      Privacy & Cookies      Contact us...
 
 
 
 

 

Docs HomePrint:   Print this page