Members

Note: You can use your Sitellite.org account here and vice versa.

Username

Password

Remember Login

Forgot your password?

Not a member? Click here to register

External Forms

Home Page | All Pages | Recently Revised | Authors | Feeds |

The reason Sitellite can't simply embed HTML forms into pages is because it also uses the <xt:form /> tag to embed its own forms into the page, and the two get mixed up by the XT template parser that looks at the page body for form and box tags to render.

As a quicker workaround than converting your forms to Sitellite forms, you can simply set up boxes for each of them in your custom app folder (ie. inc/app/myapp). To do this, you'd follow the following steps:

1. Make sure there's a conf/config.ini.php file in your custom app with these lines in it:

app_name = Name of App
boxchooser = yes

2. Create an inc/app/myapp/boxes/forms folder and put the following access.php file into that folder:

sitellite_access = public
sitellite_status = approved
sitellite_action = on
sitellite_inline = on

(Note: If some forms are private then you can override this with an access.php file in the individual form folders which we'll create in the next step.)

3. For each form, create a folder under inc/app/myapp/boxes/forms, ie. inc/app/myapp/boxes/forms/form1. In that folder, make two files, settings.php and index.php. The settings.php file will contain the following:

settings.php
[Meta]

name = Name of Form
description = Description of the forms purpose

The index.php file is where you'll paste in the HTML for your form. For example:

<form method="post" action="/cgi-bin/example.cgi">
Example: <input type="text" name="example" />
<input type="submit" value="Submit" />
</form>

4. To embed a form into your page now, simply edit that page and click the box chooser icon. Select your app from the list of apps. Select the desired form from the list on the next screen. This will embed the form into your page and will be visible on the site as soon as you save the page.

(Note: For Sitellite GPL users, you can paste in an <xt:box name="myapp/forms/form1" /> tag into the source view of Xed.)

For subsequent forms, omit steps 1 and 2.

Revision from August 1, 2007 1:15 PM by anonymous

Forward in time (1 more) | Back in time (1 more) | See current | See changes | Linked from: Forms