Fullscreen
[Show/Hide Left Column]
[Show/Hide Right Column]

Contact_Form

After you install

  1. Visit Contact_us
  2. Go to watch the newly created tracker

Contact form

Goal: to make tiki-contact.php obsolete

A contact us form is one of the most obvious uses of trackers in Tiki. They are very simple, and yet they take many steps to configure. This profile will enable the tracker feature and create a basic "contact us" form to which you will be able to add additional fields.

Create the database

YAML
preferences:
 enable: [ feature_trackers ]
objects:
 -
  type: tracker
  ref: contact_us_form
  data:
   name: Contact us
   description: Contact us form
   default_status: open
   show: [ status, creation_date, modification_date, list_modification_date ]
   allow: [ comments ]
 -
  type: tracker_field
  ref: contact_us_summary
  data:
   name: Summary
   tracker: $contact_us_form
   type: text_field
   flags: [ searchable, public, list, mandatory, link ]
   order: 10
 -
  type: tracker_field
  ref: contact_us_name
  data:
   name: Your name
   tracker: $contact_us_form
   type: text_field
   flags: [ searchable, public, list ]
   order: 20
 -
  type: tracker_field
  ref: contact_us_email
  data:
   name: Your email
   tracker: $contact_us_form
   type: email
   flags: [ searchable, public, list ]
   order: 30
 -
  type: tracker_field
  ref: contact_us_message
  data:
   name: Your message
   tracker: $contact_us_form
   type: text_area
   flags: [ searchable, public ]
   order: 40



Add the wiki page


This will use Contact_us
YAML
preferences:
  enable: [ feature_wiki ]
objects:
  -
    type: wiki_page
    ref:  contact_us_form_wiki_page
    data:
      name: Contact_us
      description: Contact us
      lang: en
      content: wikicontent:Contact_us


YAML
!!Permissions
permissions:
 Admins:
  allow: [ admin_trackers ]
 Anonymous:
  allow: [ view, wiki_view_history ]
  objects:
   -
    type: tracker
    id: $contact_us_form
    allow: [ create_tracker_items ]


Bug



Todo

  • Add permissions for anonymous to add to tracker
  • visitor should receive a copy of the email (optional)
  • Sender email needs to be set (could be using interactive)


Contributors to this page: Marc Laporte6087 points  .
Page last modified on Tuesday 14 of September, 2010 02:25:47 UTC by Marc Laporte6087 points .