Using Live Value Settings to Define Static Values

In its simplest form, Live Values are a way of setting a default value for a field. within an Admin Form, Search Form or Site Form. Within one of these views, click the "2" button. If "Default" is selected in the "Live" column, then you can simply type a value in the "Live Value" column. For fields with pre-defined options (radio fields, checkbox fields, select fields etc.) you can click the "<<" and select a value from the popup.

E.g. if you put live value on the Article Category Id field like on the image above, you article will save to the category with id 14

Using Live Value Settings to Define Dynamic Values

The real power of Live Values come in their ability to pre-fill dynamic values in fields. In SEBLOD core, these dynamic values can either come from the logged in user's session, or from the stage where the form is placed.

Using the User's Session to fill a Live Value

When a user is logged in, certain variables are stored in the session and are retrievable by SEBLOD.
  1. Select "User" from the "Live" column
  2. Click "configure" in the Live Value column
  3. In the "Property" field, enter the user profile value that you are trying to retrieve. For example, if you want to retrieve the username, you type "username". If you want to retrieve the user's first name (which is a field that SEBLOD adds to the standard Joomla user profile) you type "first_name"

Any value that is included in your User content type can be used as a User > Live Value property.

Using the Form's Stage to fill a Live Value

The "stage" in SEBLOD is the page you are looking at, including invisible elements like variables that are accessible on the page such as those stored in the URL. If you have URL rewriting and Search Engine Friendly URL's turned on in Joomla, the variables stored in the URL of a page might not be immediately obvious. However, with those settings turned off, you can see some variables:

In the URL above we can see that the link (with SEF URL's turned off) contains many variables. These are:

  • Variable: option     Value: com_content
  • Variable: view        Value: article
  • Variable: id           Value: 10
  • Variable: catid       Value: 2
  • Variable: Itemid     Value: 101
If you turn SEF URL's back on, these variables are still present in the URL, but they are masked.
When you select URL > Variable in the "Live" column, and click "configure" you receive these options in a popup window.

"Type" specifies the formatting of the variable you are retrieving from the URL. From the above list of variables in our example, the "view" variable is a "string" because it contains only letters, whereas the "id" variable is "Int" (Integer) because it contains only numbers.

"Variable" is where you specify the variable from the URL that you are trying to retrieve the value for. For example "id" or "catid".