TOPIC:

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

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

stupid question, im having difficulty pulling seperate varibales out of the foreach command. there are around 35 different values i will need to get, is there another way to get them or ccan i just simpley call the some how when i need them without the foreach?

is it possible to just simply call appon each field and get the value eg something like:
$sat_date = $MAILDATA[_FF_DATA_VALUE, "sat_date"];
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 #2731

  • moriwenne
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Karma: 5
  • Thanks: 1
Ok jimyjim, let's think about this. The foreach effectively creates a cycle to run thru the array. That array is what you are given to work with and it contains pairs of datafield, value.
Now it makes sense that as you cycle thru the array, that if you want to reference the values later on then you have to assign the values to variables. That's what you were trying to do and it will be easier to read and use. You did speak about having 35 difference and damn! that's a big form :)
I hope you understand the process I explain above, it's how cycles work.

That said, you should also realise that, your data is already in a big multidimentional array, you just need to access it. How to do that? That's the question. Although the following will work, it might be hard to control and read but you will be the decider of how you want to proceed.
So say you have a table and at this position you want to insert the value from the 1st form field, then you could just put the line

<?=$MAILDATA[0][4] ?>

What that will do is get you the first field item (0) and then from that one, get the value (4). If I'm not mistaken, each item should have an id(0), title(1), name(2), somethingelse(3), value(4), that's why we choose 4. So for you to reference the 35th item you would use [34][4].
Of course this way you can't move things around after you finalise the email, otherwise if you do you'll have to update this file. But hey, forms don't usually change so as long as you put a comment on the mail.html.php file saying exactly what you're doing so that you can remember later and others can understand it, it's one way to go.

Anyway, just another couple of ideas I'm throwing your way, see what fits.

Enjoy
Mori

PS: I charge by word if I didn't mention it before. It's 0$ per word and I've written lots of words already so 0 times a lot of words makes hmm 0. Should consider charging a bit more in the future maybe.

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

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

  • jimyjimjames's Avatar
  • jimyjimjames
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 0
hahaha yeah all makes sense, i must say i thought it was cheap lol your a great um mentor mori. the guy im doing my trianeeship with well doesnt know php so its up to me to learn and all i got is the internet so i got know one here to guide me.

like i said mori ur a great mentor, every word you have said makes sense and is very very clear. :)I cannot thank you enough.

P.S. please dont put your prices up trainneeship wages are well hmm lets say im 19 and i get paid the same as a 15 yr old lol except instead of blowing it on candy i got bills and petrol and all that jazz lol CHEERS :)
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 #2733

  • moriwenne
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Karma: 5
  • Thanks: 1
Lol, you just made me laught dude. All I know is that I've gone thru learning many little things about this and that component, language, application and I know very well how a little help at the right time can just make us thrive. "Do onto others as you would want done onto you", although I'm not religious that's a good moral I like to live by :)

I'm off to bed. Best of luck jimyjim.

Mori

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

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

  • jimyjimjames's Avatar
  • jimyjimjames
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 0
So true mate with the do onto others.... it is a great moral to live buy. well i tried those variables and got rid of the foreach and it is all working the way i need so yeah i'll build up this email and ill let you know how i go.

If you need any help with anything (i know i wont know as much as you but i work with joomla every day so i may come in handy 1 in 10 times :)) just give us a well. i got skype and msn if you want it let me know and ill pm it to you
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 #2765

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

once again thankyou so much for your help, finished the display of the email all is good cheers like i said if for some reason you need help with anything (doubt it though, well mine anyway) just give me a well on skype.

Cheers master jedi :lol:
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.051 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!