📜 ⬆️ ⬇️

MODx eForm

eForm is a great tool for working with forms (feedback, questionnaires, etc.). To begin with, in order to understand it, I decided to translate the possible parameters. It can be treated as a set of opportunities.

The text is very voluminous, because there are so many possibilities.


')

Description



eForm is engaged in processing the data that users enter in
forms on the site. Received data can be sent by email using
html format, attachments,
answering machine, as well as advanced data processing and the generation of custom
reports.

Required parameters


& formid

ID of the form that is used when sending
data. This parameter is necessary if more than one page is used.
forms. Your form template must have a hidden field with the same identifier: <input type = "hidden" name = "formid"
value = "formName" /> or (starting with eForm 1.4.x) you can
set the id directly in the form tag: <form
id = "formName" ...>;

& tpl

The name of the chunk (not a number) or the document identifier (number) for
template used (new in 1.4.4) You can also use a snippet as
template source. In this case, no parameters are passed. For regular
form fields you do not need to include variables, as they are automatically
include eForm,
Except when you set your own values. Specials are available.
variables: [+ validationmessage +],
[+ postdate +], [+ verimageurl +] and [+ debugText +]. Each form must contain
variable [+ validatiomessage +].

& report

Chunk name (not a number) or document identifier (number) for a template
report. Must contain every form.

Extra options


& to (optional)

Email Address
to which information will be sent. You can use multiple addresses
separating them with a comma (,). If not specified, the system address will be used.

& from (optional)

Sets the email sender address.

& fromname
(not necessary)

Sets the name of the sender of the letter.

& replyto (optional)

The email address or field containing the address to be used in
letter for reply.

& sendirect (optional)

Includes the ability to use a form field to determine the address
who will be sent a letter.


& cc
(not necessary)

Also like & email but
for Cc:

& bcc
(not necessary)

Also like & email but
for Bcc:

& ccsender
(not necessary)

Send a copy of the form data to the user. The default is set to 0. eForm is looking for
user address in the field with the name email.


& subject (optional)

Subject of the message, which may include [. Form fields.]. For example: Thanks
for your order [.firstname.] [.lastname.]

& noemail (optional)

Protects eForm from
sending letters


& mailselector (optional)

Sets the form field to be used when selecting
single address from comma separated list (,) for
use in the & to parameter. The field values ​​will determine
number of the used postal address. Number 1 corresponds to the first address and N - to the last.

Example: & to
= `sales @ me.com, support @ me.com, billing @ me.com` & mailselector =` topic`

The form uses the topic field as a drop-down list. When
the user selects a value, then he determines one address by
which will be sent these forms.

& mobile (optional)

The email address of the mobile device. Used to send short
messages.

& mobiletext (optional)

Message to send to your mobile device. May contain [.fields
forms.]. For example: Order for [.firstname.].

& thankyou (optional)

The name of the chunk (not a number) or the document identifier (number) for
used message template output to the user after sending data
forms. Tags like u & tpl

& gotoid (optional)

Document ID to which the transition will be made after sending
form data. See also & thankyou.

& category (optional)

The name or category ID used to categorize the eForm. If the category is not found, then
it will automatically be created. This is used in the subject line.

& keywords (optional)

Comma separated (,) keywords or [+ form field +]
used when searching a data bank. For example: [+ firstname +],
[+ lastname +], [+ email +]

& autosender (optional)

Email address that is displayed when sending a message
answering machine. For example: no-reply@mydomain.com

& autoSenderName
(not necessary)

The name used in the autoresponder message.

& automessage (optional)

The name of the chunk (not a number) or the document identifier (number) for
template used in the message answering machine. May contain [. Form fields.].

& allowhtml (optional)

Enables users to use HTML in the message.


& language (optional)

Sets the language used for messages and checks. Name of languages
matches MODx.

& vericode (optional)

Includes verification code. The template must contain a field for verification and
variable [+ vericode +].

& debug (optional)

Includes extended error messages in form validation. Basically
for debugging #LIST and #SELECT.

& sendAsHtml (optional)

Defines which messages will use the html format.


& sendAsText (optional)

Defines which messages will use text format.


& sessionVars (optional)

The names of the $ _SESSION session variables,
comma separated (,). They will be added to the list of field values ​​before
form display and can be used as hidden fields. If you
use this parameter, then make sure that you do not disclose the important
session information (hidden fields do not protect information!).

Since eForm does not perform
self-processing of such values, then you need to include them in
template. For example:
[! eForm & sessionVars = `jobID` ...]] and <input type =" hidden "
value = "[<! - -> + jobID +]" />

& postOverides (optional)

Used in combination with & sessionVars. Session variables will be
rewritten with input values. When set to 1, the values ​​obtained in
form data is given priority.

& reportAbuse (optional)

When set to `1`, messages will be sent to a special
email address if an eForm injection attempt is noticed (use moderately).

& cssStyle (optional)

Adds a style definition to the area of ​​the page on which
the form or message for the user is displayed after sending
(only if the parameter & thankyou
installed). Values ​​can be in the form of a document identifier (number), name
chunk or style sheet references (relative or absolute). Can
use multiple values ​​separated by commas (,) (you can actually
combine all three kinds of values).

Examples:

[! eForm
& cssStyle = `assets / site / forms.css, chunkName` ...]]
[! eForm & cssStyle = `chunkName` ...]]
[! eForm & cssStyle = `http: //mysite.com/assets/styles/forms.css`…]]]

Chunks (and documents if the document ID is set) can
use values ​​in the form:

  1. as
    built-in unit
    as a link to the style sheet: <link href = "assets / site / forms.css"
    rel = "stylesheet" type = "text / css">
    as a comma separated (,) list of references to style sheets:
    assets / site / forms.css, assets / site / more.css, assets / site / gone_overboard.css

Source: https://habr.com/ru/post/14751/


All Articles