Elxis CMS Forum

Support => General => Topic started by: ROUBOS on March 20, 2012, 01:55:24

Title: Elxis Forms bot (eForms) error ??? [SOLVED]
Post by: ROUBOS on March 20, 2012, 01:55:24
Hi,
when I create two different forms in data.xml, they do not display getting the message "Could not generate form Reservation!"

here is my data.xml
Code: [Select]
<eforms>
<form name="samplecontact" method="POST" action="email">
<title>Contact us</title>
<description><![CDATA[
<strong>eForms</strong> is a free bot that allows you to display and process HTML forms within Elxis CMS content items.<br />
This sample form contains all types of elements eForms supports in order to use it as a sample for your own forms.<br />
Created by Ioannis Sannos &copy; 2008-2011 <a href="https://www.isopensource.com" title="IOS - Web services and software">Is Open Source</a>.
All rights reserved.
]]></description>
<onsuccess><![CDATA[
This is a sample text that is being displayed after successfully submitting the form.<br />
Bot <strong>eForms</strong> by isopensource.com allows you to easily change this message by editing
the form info on data.xml file.
]]></onsuccess>
<email>name1@domain.com;name2@otherdomain.gr</email>
<submit>Submit eForms!</submit>
<items>
<item type="text" label="Your name" required="1" size="20" default="Ioannis Sannos" description="Please enter your name"></item>
<item type="date" label="Departure date" required="1" description=""></item>
<item type="email" label="Your email" size="30" required="1" sendcopy="1" default="" accesskey="E" description=""></item>
<item type="number" label="P.O. Box" size="5" required="0" default="" accesskey="N" description=""></item>
<item type="url" label="Web site url" size="40" required="0" default="https://www.isopensource.com" description="Enter your website URL (if any)"></item>

<item type="select" label="Favorite team" required="1" default="Olympiacos" description="">
<option>Olympiacos</option>
<option>PAOK</option>
<option>Panathinaikos</option>
<option>AEK</option>
<option>Liverpool</option>
<option>Milan</option>
</item>
<item type="separator" label="" default="" description=""></item>
<item type="h3" label="Other details" default="" description="" class=""></item>
<item type="p" label="" default="" description="" class=""><![CDATA[
You can write HTML text to be displayed as a paragraph. You can also write your text inside the
<strong>description></strong> attribute but without HTML.
]]>
</item>
<item type="country" label="Country" required="1" default="GR" accesskey="C" description="Please select your country"></item>
<item type="range" label="Age" required="1" options="1;40" step="1" default="20" description="Select your age"></item>
<item type="price" label="Price" required="0" default="0.00" size="10" currency="EUR" description=""></item>
<item type="radio" label="Gender" required="0" default="Male" description="">
<option>Male</option>
<option>Female</option>
</item>
<item type="checkbox" label="Hobbies" required="0" default="" description="You can pick multiple choices">
<option>Tennis</option>
<option>Football</option>
<option>Basketball</option>
</item>
<item type="captcha" label="Security code" default="" description=""></item>
<item type="hidden" label="Quantity" required="0" default="5" description=""></item>
</items>
</form>
<form name="Reservation" method="POST" action="email">
  <onsuccess>Reservation Request Sumbited Successfully! Thank you!</onsuccess>
  <email>myemail@email.com</email>
  <submit>Submit</submit>
  <items>
<item type="date" label="Check In:" required="1" description="Select check in Date"></item>
<item type="date" label="Check Out:" required="1" description="Select check out date"></item>
<item type="range" label="Adults (>12y)" required="1" options="1;6" step="1" default="1" description="Number of adults"></item>
<item type="range" label="Children (3y-12y)" required="1" options="0;6" step="1" default="0" description="Number of children"></item>
<item type="separator" label="" default="" description=""></item>
  <item type="h3" label="Personal Infomation" default="" description="" class=""></item>
<item type="text" label="Name:" required="1" size="20" default="" description="Please enter yout name"></item>
<item type="text" label="Surname:" required="1" size="20" default="" description="Please enter yout surname"></item>
<item type="text" label="Email:" required="1" size="20" default="" description="Please enter your email address"></item>
<item type="country" label="Country" required="0" default="GR" accesskey="C" description="Please select your country"></item>
<item type="separator" label="" default="" description=""></item>
<item type="textarea" label="Message" cols="60" rows="3" required="0" default="" description="Write a message"></item>
<item type="captcha" label="Security code" default="" description=""></item>
  </items>
    </form>
<form name="Kratisi" method="POST" action="email">
  <onsuccess>Η αίτηση κράτησης ήταν επιτυχής! Σας ευχαριστούμε!</onsuccess>
  <email>myemail@email.com</email>
  <submit>Υποβολή<submit>
  <items>
<item type="date" label="Άφιξη:" required="1" description="Επιλέξτε ημερομηνία άφιξης"></item>
<item type="date" label="Αναχώρηση:" required="1" description="Επιλέξτε ημερομηνία αναχώρησης"></item>
<item type="range" label="Ενήλικες (>12χ)" required="1" options="1;6" step="1" default="1" description="Αριθμός ενηλίκων"</item>
<item type="range" label="Παιδιά (3χ-12χ)" required="1" options="0;6" step="1" default="0" description="Αριθμός παιδιών"></item>
<item type="separator" label="" default="" description=""></item>
  <item type="h3" label="Προσωπικά στοιχεία" default="" description="" class=""></item>
<item type="text" label="Όνομα:" required="1" size="20" default="" description="Παρακαλώ εισάγετε το όνομα σας"></item>
<item type="text" label="Επώνυμο:" required="1" size="20" default="" description="Παρακαλώ εισάγετε το όνομα σας"></item>
<item type="text" label="Email:" required="1" size="20" default="" description="Παρακαλώ εισάγετε τη ηλεκτρονική σας διεύθυνση"</item>
<item type="country" label="Χώρα" required="0" default="GR" accesskey="C" description="Παρακαλώ επιλέξτε τη χώρα σας"></item>
<item type="separator" label="" default="" description=""></item>
<item type="textarea" label="Μήνυμα" cols="60" rows="3" required="0" default="" description="Γράψτε ένα μήνυμα"></item>
<item type="captcha" label="Security code" default="" description=""></item>
  </items>
    </form>
</eforms>

When I remove the second form I've created it works.

And I have checked the encoding to be UTF-8 without BOM
Title: Re: Elxis Forms bot (eForms) error ???
Post by: nikos on March 20, 2012, 11:16:36
Each form starts with tag <form> and closes with </form>

Into the code you placed at your topic there are 3 forms with names samplecontact, Reservation and Kratisi

The syntax of all looks fine (apart some minor orthographic mistakes). In your case the form name Reservation i could change it to reservation and the form name Kratisi to kratisi

Avoid capital letters (uppercase) into form names, no reason to use it.

Each form in order to be displayed correctly into content needs the right syntax using bot eforms. So,

For 1st form you have to type into content this: {eforms}samplecontact{/eforms}

For 2nd form you have to type into content this: {eforms}reservation{/eforms}

For 3rd form you have to type into content this: {eforms}kratisi{/eforms}

So check again the bot syntax.
Title: Re: Elxis Forms bot (eForms) error ???
Post by: ROUBOS on March 20, 2012, 12:56:07
Found the syntax errors. Thank you.
Notepad++ helped out with the color codes :)
Title: Re: Elxis Forms bot (eForms) error ???
Post by: nikos on March 20, 2012, 14:11:32
You are welcome  ;)

In order to be all fine, you can correct some typing mistakes, which i saw into second form

1. Change the "Sumbited" to "Submitted"

2. Change the "yout" to "your"

Title: Re: Elxis Forms bot (eForms) error ???
Post by: ROUBOS on March 20, 2012, 14:55:03
thanks for pointing it out :) Appreciate it