Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Do you know that with EDC installer you can download and install extensions with just one click directly from EDC?
 
Pages: [1]
  Print  
Author Topic: XML forms bot  (Read 876 times)
datahell
Elxis Team
Hero Member
*****
Offline Offline

Posts: 5791



WWW
« on: June 09, 2010, 07:48:03 PM »

I write here an idea of a bot with which a site owner will be able to easily add forms, of any kind, to standard elxis content items and autonomous pages. I can not built it myself as I have no free time available. If anyone wants to built he will have my help.

The general idea is that the forms are written in an XML file (unlimited number of forms can be supported) and the bot parses this XML file and creates an HTML form based on the elements provided in the XML file. Inside your content item you will only have to write somehting like this:

{xmlform}contact{/xmlform}

Where contact is the name of the form you want to display on that specific article.
The edit of the XML file is done by hand. If you wish to make it editable from the Elxis administration area you will have to also create a component or an elxis tool.

The forms can have 2 type of actions: email (multiple recipients support) and URL (any URL).
You can see attached an example of such a form.

To parse the XML file you can do it easily with PHP5.x simpleXMLElement class (recommended on Elxis 2009.2+). Afterwards you convert the XML declarations to html source code.

Besides the standard form elements you can have fields like country (automatically creates a country selection drop down list), email, url, telephone, price, etc. This separation will make also easier to validate the submitted data after the submit.

* xmlforms.zip (0.68 KB - downloaded 44 times.)
« Last Edit: June 09, 2010, 07:51:13 PM by datahell » Logged

Elxis Team | Is Open Source | IOS Reservations | IOS Eshop
nikos
Elxis Community
Full Member
*****
Offline Offline

Posts: 233


WWW
« Reply #1 on: June 10, 2010, 02:47:22 AM »

My Man!  Cheesy

You just came straight to my question i have asked you recently about such a possibility. It will be very useful such a bot. I want to work on this and i will contact you for details.
Logged
Pages: [1]
  Print  
 
Jump to: