Launching Forms by URL
You can launch a form directly by URL by using the
following convention:
http://yourhostname/yourvivaldidirectory/index.php?route=ogs/dynamicform.php?formkey={yourformguid}
Where the items in bold will depend on your Vivaldi
deployment. The
yourformguid value will be
the formguid of the form you want to launch. You can find
that information by either (a) launching the form, or (b) from
the Forms>Manage Forms>Form Designer in the "Form
Properties" panel.
Developer Tools
Vivaldi takes advantage of my libraries that are available
for your own use and refence as well. The master page
makes the following available:
URL Parameters
- rowlimit - For tablular forms you can
limit the number of rows to return at runtime.
- altkey - You can pass a column name
that you want to limit values by. Encode the value if it
has spaces.
- altkeyvalue - In combination with the
altkey parameter, you can pass in a value you want to filter
rows by.
Form SQL
When you design a form, you have the option to specify the Form
SQL that will be used to fetch records. In that field, you
can use the most basic, which is a select all rows from your base
table (Vivaldi automatically populates that for you when you
specify your Base Table), or add your own criteria. That
criteria might point to a MySQL View, or include SQL for that form
only. Vivaldi also supports runtime determination of the
username by adding the following keyword to your SQL: [username].
For example, if you want the user to only see their own records in
a given table, you can set your Form SQL to something like the
following:
SELECT * FROM mytable where
username='[username]'
You can create notifications for your end users to see in the
upper right-hand corner of the menu bar via several methods:
- Write records to the table ogs_notifications. The
user id (fk_userid) and subject are the only required items.
- Use the delivered javascript function
createnotification(fk_userid, messagebody, notificationtype,
messagefrom, messagesubject).
- Use the delivered php function
fCreateNotification($fk_userid, $messagebody,
$notificationtype, $messagefrom, $messagesubject)
User Mass Creation
Vivaldi can help you mass create new users based on data
from one of your tables.
- Open the file ogs/umc.php
- Change the line if ($_GET['authtoken'] != '******') {
with your own unique string (for security, to prevent someone
that reads this page from trying to mass create users on your
server).
- Open the file ogs/umc.php in your browser with the
following URL parameters
- authtoken - The authorization token
you created in the first step.
- sourcetable - The name of the MySQL
table/view that contains your user information.
- col_email - The column in the MySQL
table that contains the user email addresses.
- col_username - The column in the
MySQL table that contains the unique user names. This can be
the same as the email address if desired.
- col_customid - Optional. The column
in the MySQL table that contains the custom_id value you want
to associate with the user's record.
- roleassignment - The role identifier
from ogs_role (roleid) that you want to assign the users.
- nonotifications - (optional) Set to
'1' to send email notifications to users
- The new users' passwords will be 'tmp_username' and
they will be asked to change their password after they login.
For example,
ogs/umc.php?authtoken=1234&sourcetable=myusers&col_email=useremail&col_username=username&roleassignment=99
Audit History Wizard
The Audit History Wizard automatically creates a new audit history
table (yourtablename_audit) for your selected base table, as well
as MySQL triggers to automatically write any
inserts/changes/delete history to the audit history table. You can
access it via: index.php?route=ogs/auditsetup.php. If you are
upgrading from Vivaldi 3.3 or lower, you will also need to add a
Custom Form Permission row (Security>>Custom Form Permissions) for
your administrator user account with the Custom Form name
'auditsetup'.
Custom HTML Head and Foot
You can edit the files customer_htmlhead.php and
customer_htmlfooter.php to add your own PHP or html to every page in
Vivaldi. These files are no overwritten when upgrading to a new
version, and can be very useful for things like web usage
tracking/analytics code, or other elements. Note that these pages
are loaded on the index.php page, not inside each form loaded
within index.php, so the PHP and HTML will be loaded only when a
full page load/refresh occurs.
Custom Translations
If you wish to provide a new language in your application, or
adjust the existing translation strings, edit the file
"js/translation_customer.js". Use the example convention for any
new translation strings:
"String you want to translate" : {
es : "Spanish
Translation",
fr : "French Translation"
}
You can add new translation languages by following these
steps:
- Add the language to the ogs_language table, with the
language column using the ISO 639-1 code, and the languagename
column containing the display name of the language.
- Add the new translation strings to
translation_customer.js. For simplicity, you may want to copy
the existing strings from translation_strings.js since it
contains all the strings present in Vivaldi's admin screens.