button_brick help
Display a clickable button anywhere on a page. Unless noted otherwise, it must be in a form defined by an include_brick.
(Add or update of posts is not yet implemented. Search of users is not yet implemented.)Attribute | Values | Default |
---|
actions | Actions can be one or more of the following, separated by the bar '|' symbol, such as 'add|update|login'add | Add post or user if new. | update | Update existing post or user. Fail if post or user doesn't exist. | login | (Users only) Login if not already logged in as this user | logout | (Users only) If there is a logged in user, log them out (Does not need to be in a form.) | save | (only if a this or a parent page is included using a usercustom_field defined) Save the form values to the user custom field. All values in the form will be added to the custom field. All values not in the form will be removed. | addset | (Only used when on a page or child of a page that has the action attribute of "Add"). Add the current set of field values to the form. | deleteset | (Only used on a page or child of a page that has the action attribute of "list"). Delete the current set of field values from the form. | search | Form is used to search for matches to user or post fields in the form | get | Submit form as a get, not post. Because of the size limitation on a url, this is done as a post followed by a get using tokens. |
| no default |
objects | 'user', 'post', or 'user|post': needed only if the action isn't restricted to users or posts. The object to which fields are added, updated, or searched. | no default |
page | The name (slug) of the destination page when this button is clicked if '*' is the first character in the page then use this page with the optional addition of new parameters (eg. '*?parameter=value¶meter=value') (The added parameters are passed directly to the page programatically and do not appear on the URL in the browser.) | * (this page) |
ajax | The id of the dom object whose inner HTML will be replaced with the contents of the destination page | '' (page load not using ajax) |
defaultbutton | if yes, the button associated with form submission using the enter key. | no |
label | The text label on the button | no default |
external | 'no' if this defines an actual brick button 'yes' if this is the name of an external button that will submit this form including all bricks within the form. | 'no' |
style | Direct CSS styling for the button | no default |
class | The CSS class of the button | 'c', page, and 'action' separated by underscores eg c_destination-page_login |
name | The html name of the button | 'n', page, and 'action' separated by underscores eg n_destination-page_login |
id | The html id of the button | 'i', page, and 'action' separated by underscores eg i_destination-page_login |
help | 'yes' or 'no' | 'no' |
display_brick help
Display the value of a Wordpress field anywhere on a page.
For users this is the logged in or selected user.Attribute | Values | Default |
---|
value | The value to be displayed:
post | field | <fieldname> | Defines a field belonging to the WP posts table, eg. value='post.field.post_type' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP postmeta table, eg. value='post.meta._price' |
| custom | <fieldname> | Defines a custom field belonging to the WP postmeta table, eg. value='post.custom.publisher' |
|
| user | field | <fieldname> | Defines a field belonging to the WP users table, eg. value='user.field.user_email' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP usermeta table, eg. value='user.meta.last_name' |
| custom | <fieldname> | Defines a custom field belonging to the WP usermeta table, eg. value='user.custom.allowance' |
|
| option | <fieldname> | Defines a field within the WordPress option named by a parent include_brick's 'option_field' paramter. As an example, if the display_brick references option_field='employees', then here value='option.last_name' would be the last_name field within the employees option. |
| $_SERVER | <name> | Reference to the value of the server variable 'name'. If the variable is missing, treat as empty string (''). |
| search | items_per_page | Defines the field where the user can see the number of items shown per page, eg. value='search.items-per-page' | page_number | Defines the field where the user can see the page being displayed, eg. value='search.page-number' | total_items_found | Defines the field where the user can see the total number of items found, eg. value='search.total-items-found' |
| NOTE: some fields, such as image IDs, have additional fields, such as the type of image and what about the image is to be retrieved. An example would be value='post.meta._thumbnail_id.thumbnail.url' which would retrieve the 'thumbnail' image as a 'url' from the image ID. | no default |
format | How to display the value if not 'as is':
image | Display the field as the src for an image. Also, there is no span. | currency | Display the field as currency | M d, Y | Special date/time formatting as defined in the table here: Date/Time Formatting. This is an example. Anything that obeys the rules can be used. |
| no default |
default_value | Display this if no existing input source (form, custom field, or user) | no default |
span | no: do not surround the value with a span specifying the id, style, class, and name. | yes |
style | Direct CSS styling for the displayed value | no default |
class | The CSS class of the displayed field | 'c' and the name of the field separated by underscores eg c_user_email |
name | The html name of the displayed field. Also, the name of the field if loaded from a form stored in a usercustom_field. | 'n' and the name of the field separated by underscores eg n_user_email |
id | The html id of the displayed field | 'i' and the name of the field separated by underscores eg i_user_email |
help | 'yes' or 'no' | 'no' |
filter_brick help
Define how an input field in the current form is used in a search.
(Multiple non-exclusive filters can be applied to the same field.)Attribute | Values | Default |
---|
filter | all_any | For brick meta fields searched with checkboxes, must the found item match all the checked items or any of them. Default_value can be set to 'all' or 'any' ('any' assumed if the default value not specified) | equal|greater | match if the value found is equal to or greater than the value in the field. | equal|less | match if the value found is equal to or less than the value in the field. | greater | match if the value found is stricktly greater than the value in the field. | less | match if the value found is stricktly less than the value in the field. | list | multiple values can be placed in the field and a match will happen if any of the items are found. | partial_match | For text fields, must the field exactly match or is a match within the field accepted. Default_value can be set to 'checked' or 'unchecked' ('unchecked' assumed if the default value not specified) | type | 'text' if the field is tested as text. 'number' if the field is to be tested as a number. This can be used with any other filter except 'partial_match', which is always text and ignores this filter. Default_value can be set to 'text' or 'number' ('text' assumed if the default value not specified) |
| no default |
field_name | The html name of the field for which the filter is defined. | no default |
default_value | Refer to the filters for the possible values and the default if no value specified. | see filters above. |
delimiter | The delimiter used to separate values if this is a 'list' filter | comma |
hidden | 'yes' if the filter is hidden and uses the specified default value. 'no' if the user can change the filter setting. | 'no' |
class | The css class of the filter | 'fc' and the field name separated by underscores eg fc_n_user_email |
id | The html id of the filter | 'fi' and the field name separated by underscores eg fi_n_user_email |
help | 'yes' or 'no' | 'no' |
if_brick help
Show everything after this brick only if the condition of the 'if' is met.
If_bricks can be nested and all bricks, including include bricks are processed or not processed between a matching if_brick and endif_brick based on the truth of the condition.Attribute | Values | Default |
---|
logic | Does this if_brick 'or' with the previous 'if' brick or do an 'and'.
and | The test must be true for all following content to be displayed and used. | or | The test of the previous if_brick OR this if_brick must be true. Can only be used if the immediate preceeding brick is an if_brick. If the preceeding if_brick was 'and' AND it changed the display of content from true to false, then if the result is true for this or any immediately following if 'or' bricks, then the display is enabled. An if 'or' brick does not use an 'endif' brick to terminate the logic.
Example: [if_brick ...][if_brick ...][if_brick logic='or' ...][if_brick logic='or' ...] content [endif_brick][endif_brick] If the first if_brick is false, the content does not show. the tests in the next three if_bricks are not made. Otherwise, if all three of the following if_bricks fail, the content does not show. if any of the three is true, then the content does show. |
| 'and' |
value | The value to be tested:
post | field | <fieldname> | Defines a field belonging to the WP posts table, eg. value='post.field.post_type' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP postmeta table, eg. value='post.meta._price' |
| custom | <fieldname> | Defines a custom field belonging to the WP postmeta table, eg. value='post.custom.publisher' |
| taxonomy | <taxonomy> | Specifies a taxonomy for the post, eg. value='post.taxonomy.product_tag' The only valid values for the 'is' parameter are 'equal' and 'unequal' |
|
| user | field | <fieldname> | Defines a field belonging to the WP users table, eg. value='user.field.user_email' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP usermeta table, eg. value='user.meta.last_name' |
| custom | <fieldname> | Defines a custom field belonging to the WP usermeta table, eg. value='user.custom.allowance' |
|
| id | <fieldId> | Reference to a field on the current web page. The truth of this if_brick is rechecked each time the value of the specified field changes. (if_bricks using 'id' values must be the last bricks in a set of 'or' bricks.) |
| $GLOBALS | <name> | Reference to the value of global variable 'name'. If the variable is missing, treat as empty string (''). |
| $_GET | <name> | Reference to the value of the http get variable 'name'. If the variable is missing, treat as empty string (''). |
| $_POST | <name> | Reference to the value of the http post variable 'name'. If the variable is missing, treat as empty string (''). |
| $_SERVER | <name> | Reference to the value of the server variable 'name'. If the variable is missing, treat as empty string (''). |
| action | post.add | A post is being added, eg value='action.post.add'. Valid compare values are 'yes' and 'no'. | post.update | A post is being updated, eg value='action.post.update'. Valid compare values are 'yes' and 'no'. | search | A search has been requested, eg value='action.search'. Valid compare values are 'yes' and 'no'. | user.add | A user is being added, eg value='action.user.add'. Valid compare values are 'yes' and 'no'. | user.login | A user is being logged in, eg value='action.user.login' Valid compare values are 'yes' and 'no'. | user.update | A user is being updated, eg value='action.user.update'. Valid compare values are 'yes' and 'no'. |
| list | <listname> | count | the number of items in the list, eg to get the numbe of entries in the 'titles' list, use value='list.titles.count'. |
|
|
| no default |
is | equal | if the field or the result of the action is equal to the value or error | greaterthan | if the field or the result of the action is greater than the value or error | greaterthan|equal | if the field or the result of the action greater than or is equal to the value or error | lessthan | if the field or the result of the action is less than the value or error | lessthan|equal | if the field or the result of the action is less than or equal to the value or error | unequal | if the field or the result of the action is not equal to the value or error |
| no default |
compare_value | The value the field is being compared to. Either compare_value or error must be present, but not both. | no default |
error | existing_user_login | An attempt was made to add a user that already existed. | invalid_email | An attempt was made to login a user with an invalid or non=matching email address. | (more) | Other errors will be added as they are needed. |
| no default |
help | 'yes' or 'no' | 'no' |
include_brick help
Include another page at this location in the current page.Attribute | Values | Default |
---|
page | The name (slug) of the destination page to be included at this location in the current page | no default |
post | inherit | The post defined for the included page is the current defined post.
| new | no post: used primarily for adding a new post or for search forms. All post fields are empty. |
| inherit |
type | If this is a new post, the type of new post, such as 'page', 'post', or 'product'. | no default |
user | inherit | The user defined for the included page is the current defined user.
| loggedin | The currently logged in user | new | no user: used primarily for adding a new user or for search forms. All user fields are empty. |
| inherit |
usercustom_field | The name of a user custom field in the inherited user. (The field is from the inherited user even if the user attribute is not 'inherit'.) If the field is present, then the field contains a collection of post and/or user field values previously saved in a form. Note: this applies to all included pages to whatever depth within this page. | no default |
option_field | The name of a WordPress option. If the field is present, then the field contains a collection of post and/or user field values previously saved in a form. Note: this applies to all included pages to whatever depth within this page. | no default |
action | include | Include this page at this location. This is the way to use the content of one page on many other pages. | form | The page defines the fields of a form. Must be used to include a page that uses or includes pages that use input or button bricks that require a form. | add | (Only if within a brick form that is saved in a usercustom_field or option_field) The page contains a set of fields which can be added to a form whose fields are saved within a usercustom_field or option_field. | list | (If within pages whose field values are obtained from a usercustom_field or option_field) This page is repeated for as many times as a set of fields has been added to the form using the "add" action. (If within pages that are part of a report) This page is repeated for as many times as there are items found in the report. | report | The page defines a report that will be generated by a submitted form to this page. If a usercustom_field or option_field is specified, then it is used and the form (if present) filters the report within the filter defined by the custom field. |
| 'include' |
span | no: do not surround the value with a span specifying the id, style, class, and name. | yes |
style | Direct CSS styling for the displayed value | no default |
class | The CSS class of the form or div surrounding the displayed page | the value of the page attribute |
name | The html name of the form or div surrounding the displayed page | no default if the action is 'add' or 'list'. The include brick for an 'add' action must have the same name as the name for the corresponding include with the 'list' action. For other actions, the default is the value of the page attribute. |
id | The html id of the form or div surrounding the displayed page | the value of the page attribute |
help | 'yes' or 'no' | 'no' |
input_brick help
Display an input control for the value of a Wordpress field anywhere on a page.
It must be in a form defined by an include_brick.Attribute | Values | Default |
---|
value | The value to be changed via user input:
post | field | <fieldname> | Defines a field belonging to the WP posts table, eg. value='post.field.post_type' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP postmeta table, eg. value='post.meta._price' |
| custom | <fieldname> | Defines a custom field belonging to the WP postmeta table, eg. value='post.custom.publisher' |
| taxonomy | <taxonomy> | Specifies a taxonomy for the post, eg. value='post.taxonomy.product_tag' (Currently usable only in a search filter.) |
|
| user | field | <fieldname> | Defines a field belonging to the WP users table, eg. value='user.field.user_email' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP usermeta table, eg. value='user.meta.last_name' |
| custom | <fieldname> | Defines a custom field belonging to the WP usermeta table, eg. value='user.custom.allowance' |
|
| option | <fieldname> | Defines a field within the WordPress option named by a parent include_brick's 'option_field' paramter. As an example, if the include_brick references option_field='employees', then here value='option.last_name' would be the last_name field within the employees option. |
| search | items_per_page | Defines the field where the user can change the items shown per page, eg. value='search.items-per-page' | page_number | Defines the field that lets the user change the page being displayed, eg. value='search.page-number' |
|
| no default |
default_value | The default value to show if this is a new entry or the field is missing from the meta or custom field is missing from an existing entry. If the field is a meta field of type='checkbox', the checkbox is default checked if the default value matches the label, and unchecked if otherwise. If the default value is 'url.name', the default value is the value of the url parameter 'name'. | empty |
set_value | if this parameter is present, then the value of the field is forced to this value. This includes the use of set_value='' to set the value to empty. Do not specify this parameter to use the existing (or default) value of the field. | none |
hidden | 'no' if the user can interact with the field. 'yes' if the field is hidden | 'no' |
required | 'no' if a value in the field is not required 'yes' if a value must be entered. 'add' if required when being added to a list. | 'no' |
type | Define or override field type.
meta fields | text | (default) The value assigned to the field is entered as text in a common text input field | checkbox | The field is a checkbox and if checked, the label is assigned as the value of the field | checkboxes | The Bricks meta field has multiple values, each stored as meta_key _ with a meta_value of 1 if checked. | checkboxesall | Same as checkboxes, but there is a convenient check/uncheck all checkbox as the first checkbox. | date | Date selected via a calendar widget | select | The Bricks meta field has multiple values each stored as meta_key _. The selected option will have the meta_value of 1 and all others will be missing or 0. | textarea | The value assigned to the field is entered as text in a textarea field. |
| custom select fields | select | (default) show field as select options. | checkboxes | To search this field, show options as checkboxes. | checkboxesall | Same as checkboxes, but there is a convenient check/uncheck all checkbox as the first checkbox. |
| otherwise | The value in this field is ignored. |
| refer to values description |
validation | If present and this is a text entry field, restrict content to specified content values. Ignored for textarea, checkbox, radio, or drop down fields.
integer | Value must be a whole number, positive or negative | positive-integer | Value must be a positive integer (1 or greater) | nonnegative-integer | Value must be an integer that is 0 or greater | number | Value must be a number with 0 or more decimal places | positive-number | Value must be a positive number with zero or more decimal places | nonnegative-number | Value must be a number that is zero or greater with zero or more decimal places |
| no default-- no input validation |
format | (coming soon) how the existing value is displayed. | no default |
unique | yes: If this is a text field in a list, each entry in the list mut have a unique value in this field. Ignored otherwise. | no |
slug | yes: text value is sanitized for use as a Wordpress slug. Ignored otherwise. | no |
label | Used only for meta checkbox fields: the display value of the field and the value assigned if checked. | 'no' |
user_login | 'yes' if this field is used to assign a value to the user_login field or used also as the user_login field. | 'no' |
user_pass | 'yes' if this field is used to assign a value to the user_pass field or used also as the user_pass field. | 'no' |
user_nicename | 'yes' if this field is used to assign a value to the user_nicename field or used also as the user_nicename field. |
user_display_name | 'yes' if this field is used to assign a value to the user display_name field or used also as the user display_name field. | 'no' |
placeholder | For text entry fields, the prompt content to be placed in the field if empty examples: 'mm/dd/yyyy', 'nnn-nnn-nnnn', or 'Doe, John' For select fields, the value to be shown in the dropdown box if no option selected. | no default |
style | Direct CSS styling for the input field | no default |
class | The CSS class of the displayed field | 'c' and the name of the field separated by underscores eg c_user_email |
name | The html name of the displayed field Also, the name of the field if the form is stored in a usercustom_field. | 'n' and the name of the field separated by underscores eg n_user_email |
id | The html id of the displayed field | 'i' and the name of the field separated by underscores eg i_user_email |
help | 'yes' or 'no' | 'no' |