Forums

Can Chrono do this for me?

chronohurricane 10 Jun, 2008
I have a situation where I need to create at least two forms which have the following:

0. The initial form appears as a separate form, not on the main page

1. The initial form would have clickable images.

2. When the user clicks an image, she is taken to a new form where there are combo drop down and other controls and then, finally...

3. Add the completed item(s) to the shopping cart.

Can Chrono forms do this for me?

Are there documentation examples of how to create this more involved form situation?

Thanks very much in advance for all replies!

:)

M
GreyHead 10 Jun, 2008
Hi M,

Yes, Yes, Yes, Probably unless the cart is very strange, 'fraid not.

Bob
chronohurricane 10 Jun, 2008
Hi Bob,

Is all the documentation online for these types of linked forms and such?

I need to look for it, but haven't quite gotten to it yet.

Thanks very much!!!

M
GreyHead 10 Jun, 2008
Hi M,

Linked forms are pretty straightforward.

In the first form gather the data you need into the form fields - either input or hidden fields. Use hidden fields to gather info about the user's Joomla id or the page id. Set this form to redirect to the secodn form (or forms).

On the second form the info from the first will be availalbe to you in the $_POST, $_GET or $_REQUEST arrays ('get' for url links, 'post' for normal forms and 'request' usually has
both). Use this info to display or to look up more info in the database, or to set default values for fields.

That's it really. Have a go and by all means come back with some more specific questions.

Bob
chronohurricane 10 Jun, 2008
Knowing nothing about PHP, I guess I'll just have to dive in and see how things go.

Some actual examples would be helpful.

Are there any examples demonstrating what you're describing?

Thanks very much for your replies!!

M
GreyHead 11 Jun, 2008
Hi M,

If you are new to PHP this isn't the simplest project to start out with. That said, it's not too difficult either. Here's a simple example of a newsletter signup in Joomla 1.5.x

This is the Form HTML for a mini-form to go in a module, this collects the user's email address and redirects them to a fuller sign-up form. It has a little extra code to check if it is already on the sign-up form page.
<?php
$uri =& JURI::getInstance();
$vars = $uri->_vars;
if ( $vars['chronoformname'] != 'NewsletterPage' ) {
  $message = '<p><input name="email" type="text" id="email" 
    size="25" maxlength="35" value="EMail Address" /><br />
    <input type="submit" name="Submit" value="SEND" 
    class="icon-send" /></p>';
} else {
  $message = "<p>Please complete the form on this page.</p>";
}
echo $message;
?>
The OnSubmit code then checks that there is an entry in the email field and, if there isn't, redirects to the site home page:
<?php
$email = JRequest::getVar( $email, '', 'post', 'string', '' );
if (! $email ) {
  mosRedirect('index.php');
}
?>
Otherwise the form redirects to the full newsletter sign-up form. On this page we pick up the email address they ahve already entered, show that in the email field and ask some more questions . . .
chronohurricane 11 Jun, 2008
Yikes!

I was hoping the forms package would be basically a GUI with filling in properties.

I guess I need to get a PHP book and RTFM, eh?

Thanks again for your replies.

M
GreyHead 11 Jun, 2008
Hi M,

You have some choices here. ChronoForms is a forms manager, it doesn't have any capability to create forms or form code. But it does make it much simpler to implement them in Joomla.

Most people create their form code in DreamWeaver or Wufoo or some other html editor and paste it into the ChronoForms boxes. Mostly that works well.

If you are comfortable coding then ChronoForms lets you do very complex forms (and multiple forms), but you do have to know your Joomla and your coding.

There are other Joomla form tools like Facile Forms (for Joomla 1.0.x) that are 'drag and drop' and you need much less coding knowledge to create forms (though managing them may be less easy).

Or you can find someone to code your form for you, you can probably get it done through elance quite cheaply, or both Max and I do take on coding projects (perhaps not so cheaply).

Bob
chronohurricane 11 Jun, 2008
Interesting. I'm a Java/J2EE developer and am quite comfortable with Dreamweaver. The issue would just be getting comfortable with Chrono without an "idiot's guide" of some type to really understand it.
Thanks.
GreyHead 11 Jun, 2008
Hi M,

How far have you got with ChronoForms. If you've got a form running then you are well on the way.

The 'programming logic' is pretty normal stuff. There are two complications, one is programming in PHP which won't be too much of a problem, the other is Joomla which is good structured code but tough to get your head round or into,

My advice would be to take it a step at a time and ask questions here when you need to. There isn't a generic CF manual, but the first steps are straightforward.

Bob
asecondwill 07 May, 2009

Hi M,

On the second form the info from the first will be availalbe to you in the $_POST, $_GET or $_REQUEST arrays ('get' for url links, 'post' for normal forms and 'request' usually has
both).




Is this correct? Dos't the form go to a page with all this info, chrono deals with it (like emails it etc) and then you get redirected to the page you have specified. without the post variables.

so, how do you redirect to the 2nd form with some of the 1st forms data?
GreyHead 07 May, 2009
Hi asecondwill,

You're right, I was wrong.

When I build multi-page forms now I create all the pages in the same form (then this is true). Otherwise you have to pass the data over from one form to the next using the database, a session or a cookie.

Bob

PS The latest ChronoFormns release has a multi-page feature, I havent' tried it out yet though.
asecondwill 08 May, 2009
cool, yep - i just stored the email in the session, so the client gets 2 emails from the user with each forms details. Not ideal, but then its a quick low budget joomla site, so thats how it is.

is the multi-form feature documented anywhere? Iv'e looked around for this but can't see it.

Thanks for coming back, nice to know i wasn't doing it completely wrong.
Max_admin 08 May, 2009
Hi, regarding the multi page, you need the forms you want to tie and 1 extra mother form, this mother form ONLY will need to have the plugin enabled and configured, the "multi page" plugin I mean!

follow the tooltips, its straight forward, your data will be saved in sessions between the forms steps! you can add a navigation links to the other forms!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.