Hi, I am trying to setup Sitelok to add a log in section to my site. Adrian form Vibralogix has been so very helpful but doesn’t have freeway specific knowledge.
I have designed a customised log in form to match my site and am trying to add the sitelok code to it.
Adrian informs me I need to:
Add this code at the very top of pagewithlogin.php (before DOCTYPE)
Hi, I am trying to setup Sitelok to add a log in section to my site. Adrian form Vibralogix has been so very helpful but doesn’t have freeway specific knowledge.
I have designed a customised log in form to match my site and am trying to add the sitelok code to it.
Adrian informs me I need to:
Add this code at the very top of pagewithlogin.php (before DOCTYPE)
To do this, use the Page / HTML Markup dialog, switch to Before HTML, and paste. Be sure to avoid any extra lines of white space before or after the <?php ?> delimiters.
Replace:
with
Page / Form Setup. Use Extended to add the name attribute and onsubmit call, and paste the <?php print $startpage; ?> into the Action field.
If freeway lets you define the action , method and name for the form you may be able to set these there.
Anywhere between and is ok.
<?php siteloklogin(); ?>
Draw or insert inline a single Markup Item to hold this last bit. It can go anywhere on the page, as Freeway always wraps the entire page contents with the form tag.
Walter
Help with how to achieve this within Freeway would be fab :o) thanks
Thanks Walter, 1 & 3 are clear thank you. However I do not fully follow 2). My form is text fields within a table. What do I click on to use the Extended and I am not sure which action field you mean?
Thanks :o)
From the main menu, choose Page / Form Setup. In there, you will see fields to set the form’s Action*, Method and Encoding, and on the other tabs, the hidden fields, and extended attributes of the form tag itself. onsubmit is one such extended attribute. To add this, follow these steps.
Click on the Extended tab if it isn’t already selected.
Click New.
In the resulting dialog, enter onsubmit in the Name field and return validatelogin() in the Value field. Do not add any of the other punctuation or quotation marks that were included in the raw HTML example you quoted. (If you’re reading this in Mail, don’t include the back-tick characters I used to wrap the code, those tell the Web view of this list to style the type as code and not curl any quotes.)
Okay out of the stack of dialogs.
When you publish, you should see the same HTML (more or less, order of attributes is not important) as the example you were working from.
Walter
*It’s a bit of a name collision – Action, in the context of a form, equals “where do I send this thing?”, rather than anything to do with Freeway Actions.
On Aug 15, 2012, at 9:26 AM, gfel wrote:
Thanks Walter, 1 & 3 are clear thank you. However I do not fully follow 2). My form is text fields within a table. What do I click on to use the Extended and I am not sure which action field you mean?
Thanks :o)
Sure. Just paste that code (<?php siteloklogout()?>) in the URL field of the Hyperlink dialog (external tab) when you make your logout button or text link. Command-K opens that dialog, or you can choose it from the main menu with Edit / Hyperlink.
Walter
On Aug 15, 2012, at 3:56 PM, gfel wrote:
Thanks Walter that’s great. Could I ask one more thing. Please can you tell me how to add this to a log out graphic button.
To add a logout you just need to create a link or button using <php
siteloklogout(); ?> as the hyperlink.