blog

Online Offer Form




Online Offer Form

 · Jun 8, 14:59

This plugin make it possible to clients to get an first offer. The client has only to answer few questions to get a first price, after this he can fill the form for an individuell offer.

Install Instructions
First get this leo_offerform_v0.1.zip and extract the zip archive.
Create a “js”(chmod 755) folder in your webdirectory, and extract the angebot.js, jquery-1.4.2.js and the final.txt into the “js” folder.

Put following code into your pages in the head
<script type="text/javascript" src="http://yourdomain.com/js/jquery-1.4.2.js"></script> <script type="text/javascript" src="http://yourdomain.com/js/angebot.js"></script>

Then install the plugin code over the admintab in textpattern. Create a new article for your offer site. And put the expample code in the article body. Insert in the “action” attribute the name of the article. The atrribute “list” contains the first questions. Then click on the extension tab and create new json files for the questions. Remember your choice, the name from files must match with the question in the list(eg. listpoint=“Thing”== thing.json).

Expample Code
<txp:leo_offerform mail="your@email.com" /> <txp:leo_Form action="angebot" method="post" /> <txp:leo_select name="frage1" list="Auswahl,Webseite,Template,DTP" label="What do they want an offer?" /> <txp:leo_submit value="Löschen" /> <txp:leo_endForm />

Change the text of the final.txt. The text will be displayed if all questions are answered, and the provisional price is displayed. Changes are possible over the admin-tab in the next version.
Sample final text:
Would you prefer a custom quote? Please fill out the form so I can send you a quote. Thank you very much.

JSON File

Example
{ "label":"Select our service", "frage":"questionname", "option":["Question1","Question2","Question3","Question4"], "preis": "250" }

To create a json-file press on the extension tab and then on leo_create_offer. Click on create Question and fill the form and save the file.
If you want to edit the file click on edit Question.

The create Question form contains folowing fields:

  • filename = eg. question
    the name from the question, that prefered in the select element.
  • label = label for select element
    Label for the select which contains the questions.
  • frage = question
    not needed yet, only for the referencing question.
  • option = question1,question2
    write your questions comma seperated.
  • preis = price for service in €
    “Is altered” only set in final question.

TAGS

Begin your form with this tag.
Parameters “mail” sets the recipient email.

Creates the form element.
Parameter “action” sets the form action.Enter your article url which contains your form
Parameter “method” sets the form method. Possible values: “post / get”.
Parameter “accept-charset” sets the charset for your form. Optional, default is UTF-8

Creates the first select element.
Parameters “name” must be “frage1”. NOTE: Preliminary, will changed in further Versions.
Parameter “list” contains your first questions. NOTE: Create a file for each point. The file name must match the selection. The first point must be called “Auswahl”. Preliminary, will changed in further Versions.
Parameter “label” set the label element which contains your first question.

The submit element is only to clear the form. The submit button was insert with Jquery after answer all Questions.
Parameters “value” sets the value from the button.

Creates the closing tag for the form element.

You have any question? Please visit the Forum thread on the textpattern forum.


Dein Senf dazu...

Kommentarfunktion für diesen Artikel geschlossen

/