TOPIC:

Re:Custom email notifications howto 12 years 11 months ago #2723

  • jimyjimjames's Avatar
  • jimyjimjames
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 0
Hi Mori

I have NO idea why but miraculously you test worked, so i tried a custom file again (timesheet.html.php) and it used it. ARGH like how does that work lol haha i guess its true what they say, work on something for long periods of time and not manage to get something working, then when you decide to go away for a long period, when you come back is when it decides to work (i think that makes sense) haha.

Thank you so much for your help and time, im going to try and format the email now so yeah may need your help then.

Cheers
James
James Ashworth
Mediart Solutions
www.mediart.com.au

Please Log in or Create an account to join the conversation.

Re:Custom email notifications howto 12 years 11 months ago #2724

  • jimyjimjames's Avatar
  • jimyjimjames
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 0
Hi Mori

Here is a error im getting

Parse error: syntax error, unexpected ';' in /home/thegloba/public_html/administrator/components/com_facileforms/mailtpl/timesheet.html.php on line 21

Here is my code
<?php
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
?>

<?php if ($RECORD_ID != ''): ?>
<?=$PROCESS_RECORDSAVEDID?> <?=$RECORD_ID ?><br />
<?php endif; ?>

<?=$PROCESS_FORMID?>: <?=$FORM ?><br />
<?=$PROCESS_FORMTITLE ?>: <?=$TITLE ?><br />
<?=$PROCESS_FORMNAME ?>: <?=$NAME ?><br />
<?=$PROCESS_SUBMITTEDAT ?>: <?=$SUBMITTED ?><br />
<?=$PROCESS_SUBMITTERIP ?>: <?=$IP ?><br />
<?=$PROCESS_PROVIDER ?>: <?=$PROVIDER ?><br />
<?=$PROCESS_BROWSER ?>: <?=$BROWSER ?><br />
<?=$PROCESS_OPSYS ?>: <?=$OPSYS ?><br />

<?php foreach ($MAILDATA as $DATA): ?>
<?//=$DATA[_FF_DATA_TITLE]?>: <?//=$DATA[_FF_DATA_VALUE]?><br />

<?php if (strcasecmp($data[_FF_DATA_TITLE], "sat_date" == 0)?>
<?=$SAT_DATE=$DATA[_FF_DATA_VALUE]?>
<?php endif; ?>

<?php endforeach; ?>
<?php echo $sat_date ?> "YAY IT WORKED"

I ony have a basic understanding of PHP (im learning atm as a trainee web designer, im learning in PHP 5) and i have added my bits in and change it and got no were. I noticed that hte way they have coded is different to what im use to so i had changed my stuff to what i would think to be the same format as them. But got the error above.

Any ideas?
James Ashworth
Mediart Solutions
www.mediart.com.au

Please Log in or Create an account to join the conversation.

Re:Custom email notifications howto 12 years 11 months ago #2726

  • moriwenne
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Karma: 5
  • Thanks: 1
It's good that you're doing this as a trainee, it will help and motivate you.
Your code hmm let's c, you are commenting here
<?//=$DATA[_FF_DATA...

The green colour is a clue right away.
The php tag is <?= so if you want to comment you have to do it after that like so
<?= //$DATA[_FF_DATA...

Also this <?= is the same as <?php echo so here you are doing this
<?=$SAT_DATE=$DATA[_FF_DATA_VALUE]?>
which doesn't work because it's not an echo, you need
<?php $SAT_DATE=$DATA[_FF_DATA_VALUE];?>

That's it for now. See how it goes.

Mori

Please Log in or Create an account to join the conversation.

Re:Custom email notifications howto 12 years 11 months ago #2727

  • jimyjimjames's Avatar
  • jimyjimjames
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 0
gettitng same error below is my code:
<?php
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
?>

<?php if ($RECORD_ID != ''): ?>
<?=$PROCESS_RECORDSAVEDID?> <?=$RECORD_ID ?><br />
<?php endif; ?>

<?=$PROCESS_FORMID?>: <?=$FORM ?><br />
<?=$PROCESS_FORMTITLE ?>: <?=$TITLE ?><br />
<?=$PROCESS_FORMNAME ?>: <?=$NAME ?><br />
<?=$PROCESS_SUBMITTEDAT ?>: <?=$SUBMITTED ?><br />
<?=$PROCESS_SUBMITTERIP ?>: <?=$IP ?><br />
<?=$PROCESS_PROVIDER ?>: <?=$PROVIDER ?><br />
<?=$PROCESS_BROWSER ?>: <?=$BROWSER ?><br />
<?=$PROCESS_OPSYS ?>: <?=$OPSYS ?><br />

<?php foreach ($MAILDATA as $DATA): ?>
<?=$DATA[_FF_DATA_TITLE]?>: <?=$DATA[_FF_DATA_VALUE]?><br />

<?php if (strcasecmp($data[_FF_DATA_TITLE], "sat_date" == 0)?>
<?php $SAT_DATE=$DATA[_FF_DATA_VALUE];?>
<?php endif; ?>

<?php endforeach; ?>
<?php echo $sat_date ?> "YAY IT WORKED" 

now i dont know about you but if i was to right an if statement wouldnt it be

if blah{
stuff happens
}

or does the end if allow you to not use the brackets?
James Ashworth
Mediart Solutions
www.mediart.com.au

Please Log in or Create an account to join the conversation.

Re:Custom email notifications howto 12 years 11 months ago #2728

  • moriwenne
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Karma: 5
  • Thanks: 1
Hmm, if that's the code you're using then yes it should give u an error, the syntax is just not right and you are correct in thinking about the if but not in the way that you mean :)
So to clarify, you don't use {} simply because you only have one statement afterwards. If you had more than one line then yes you would need the {}

But you have a problem with this line
<?php if (strcasecmp($data[_FF_DATA_TITLE], "sat_date" == 0)?>

first of all you open two (( and only close one )...that right there is something you're able to notice, but also you need a : after the line to start the if. So the line should look like
<?php if (strcasecmp($data[_FF_DATA_TITLE], "sat_date" == 0)):?>

I think that's the only problem i can see with that bit of code. Test it out.

Mori

Please Log in or Create an account to join the conversation.

Re:Custom email notifications howto 12 years 11 months ago #2729

  • jimyjimjames's Avatar
  • jimyjimjames
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 0
cool thanks mori heaps for your help. It worked, now i just got to get it giving me the values that i want. Ill give it a go and ill keep you posted.
James Ashworth
Mediart Solutions
www.mediart.com.au

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.057 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!