Forums

3.0 is too complicated for me

deafbiz 31 Oct, 2008
Hi all,

I'm a very enthusiastic supporter and license holder of ChronoForms. It's #1 best extension for creating forms in Joomla websites.

I was using the v2.0 versions and I've solved the problem with sending email to people on the drop down list as well as creating an SSL form for donations, and my client is very pleased with the results.

While building yet a new form and testing, I noticed that if I failed the anti-spam verification, the information got wiped out. So on a lark I decided to stop by the website to see if there's anything new.

That's when I learned about v3.0. Good thing I backed up my forms before installing v3.0 because that's when I found out the hard way that it wouldn't work!

So I used another testing website to recreate the forms in v3.0 and then do it again on my live website. Still the email wouldn't work, but the anti-spam verification reloading data works! After 1 hour of testing to see just how a simple basic form would work, I simply gave up and reverted back to v2.0 and raised the point with Max of Chronoengine.

Max requested that I create a new topic to show some code examples to make it work in v3.0.

First of all, I find it a lot easier to create the form in Dreamweaver. I really couldn't make heads or tails on the form wizard in v3.0

Secondly, I read and re-read the manual and still couldn't figure out how to create the email settings.

My problem has to do with "On Submit code - before sending email:". Everyone was talking about after sending email, no one was talking about before sending email.

If you want to know what the form in question looks like, check here: http://tinyurl.com/5edgnm

It's a simple drop down menu for a visitor to select the email to go to.

In v2.0 in the General menu I have the Form name, Email Address (of the school) and Email Subject (regarding the form), the From Email as "email" and From name as "name", which is taken from the form filled in by the web visitor. Simple enough. My question is - what's the equivalent in v3.0?

Special fields - being used so that the recipient will get a copy of the email. Again, how is that done in v3.0?

Once I get this answered, I will go back to the practice 3.0 and see if that works or not before continuing with the rest of the code, unless I'm supposed to do something different in php.

Thanks for the help.
JSG
Max_admin 31 Oct, 2008
Hi Judy,

no problems if you can use Dreamwever, the wizard was made because many people didn't know how to get the form HTML!

the equivalent to the special fields tab fields, are the Dynamic TO,Froms, subject ....etc, the normal fields at the general tab are now the TO, From name, From email..etc at the email setup too, so you have dynamic and non dynamic fields!

if you are looking for the way to do the same dynamic email dropdown as V2 then you can show me the code you was using in V2 for this part and I will help!

Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
deafbiz 31 Oct, 2008
I've sent the code via email. Thank you ;-)
deafbiz 04 Nov, 2008
Here's the code to delve into to convert from V2 to V3.

This is in the Form HTML:
<?php 
global $mainframe;
$mainframe->setPageTitle("Contact a School Staff");
?>

<input type="hidden" name="subject" value="Contact a School Staff Form" />
<p>Select the staff member you wish to contact:    
</p>
<label>
<select name="recipients" id="staff">
<option value="em1">Principal</option>
<option value="em2">Director of General Studies</option>
</select> 
  </label>
  </p>
  <p>Enter your name: 
      <input name="name" type="text" size="25" />
      <br />
Email address:
<input name="email" type="text" id="email" size="25" />
<br />
Telephone Number:
<input name="telephone" type="text" id="telephone" size="25" />
<br />
               
Message: 
<label>
<textarea name="message" id="message"></textarea>
</label>
</p>
<br />
        Please type in the anti-spam code: {imageverification}
       <br />
<p>
    <input name="This email was filled out at the school website" type="submit" class="button" value="Submit" />
</p>


And this is in On Submit code - before sending email:
<?php 
$emails = array('em1' => 'principal@domain.org', 'em2' => 'viceprincipal@domain.org');
$rows[0]->extraemail = $emails[$_POST[recipients]];
?>



Would be more useful if someone could spell out exactly which fields to use in Create Email.

Thanks the assistance.
GreyHead 04 Nov, 2008
Hi Deafbiz,

I've attached a version of your form that works in CFv3.0 Mostly this is just copy and paste but there was one problem - "$emails" is now used by ChronoForms so I've renamed your look-up array to emails_array.

I also added a hidden field to capture the email address, it has no value in the form html but is filled with the selected email address in the OnSubmit Before code.

Note: that the email template is the CF default and will need editing as will the values for the email addresses - but don't change the 'email_to' field name in the Dynamic To box.

Bob
This topic is locked and no more replies can be posted.