Install jforms




















If you select no all following settings will be ignored. Email destination Enter a valid email address where the form data will be sent to. Whilst you could have the destination email static eg. Email subject Enter a subject for the email that will be sent. The same goes for the email subject as for the email destination so it could be static eg.

Website Enquiry , or use form data eg. Email text This is where you create the template of the email. Use Ajax to send form Select this option to submit the form without reloading the page. Custom Functions Execute custom JavaScript functions. JForms Framework system plugin is required to run JForms plugins.

If you installed the JForms Full Package you already have this and just need to publish it, if not, download it now. Download JForms Framework v1. You will need to enter your Google username and password.

To fix this, open a JForms module in your module manager after setting up the plugin. You will see an error. Now head over to [gmail. Authorise access and you're good to go ;. Open the JForms module which you wish to use in your module manager, click on the options tab and scroll to the bottom.

You will see a new set of options called "Google Spreadsheets" with the following options:. Here is a little tutorial to demonstrate how powerful is jForms, the Jelix form system. This tutorial is compatible with Jelix 1.

First, let's create your application. This will allow your web server to create files in this directory see installation manual for details. This will be the main module.

Now you're going to create a form. Call it contact. Here is its content:. Now you're going to display the form. First, modify the default controller, default. In the bodyTpl property, you indicate the template to use for the main content of the page the content of the body tag of a HTML page; HTML header is generated automatically by the view.

The given string is called a selector in Jelix. A selector specifies a resource in a module. Note that this class inherits from the jFormsBase class. It uses the formfull template plugin, which accepts as arguments, a jFormsBase object, and a selector of action.

When testing this form, notice the check done on fields before the submit: some javascript code is generated automatically on this purpose. Anyway, here is the generated html code:. The formfull plugin generates the form in an HTML table.

Of course there are alternatives. By using other plugins, Jelix allows you to control precisely the html generated. Let's change that in the main. The template above use the form plugin instead of formfull. Its arguments are identicals. The formcontrols plugin do a loop over the fields declared in the contact. Now you're going to create the action method indicated in the arguments of the form plugin. In the templates above, it is called 'save'. Add this method in default. To get the instance of the form, and by the same time to fill it with submitted data, use the fill method.



0コメント

  • 1000 / 1000