PDA

View Full Version : input object to email



zaknbou
02-27-2009, 12:03 PM
hi guys,

I am working on a page it is like a POS system, where the user can buy juices and sandwiches, all i need to do now to get started is when the customer insert a number into the input object after pressing "send " it should gather all the qty inserted into the input box with the description of the item so it will be sent to my email.
how could i gather all the numbers in the input boxes linked with the description of the items ?

Please check file attached
kindly help me

holtgrewe
02-27-2009, 01:03 PM
This is a little cryptic; but should give you the idea...
It may be easier to write the order to a text file and attach it...


orderx=""
inp1 = Input.GetText("Input1")
inp2 = Input.GetText("Input2")
--etc.
if inp1 ~= "" then
orderx=orderx..inp1 .. " Apple%0d%0a"
end
if inp2 ~= "" then
orderx=orderx..inp2 .. " Lemonade%0d%0a"
end
-- etc File.OpenEmail("youremail.com?Subject=order&Body="..orderx, SW_SHOWNORMAL);
local nError = Application.GetLastError();
if(nError ~= 0)then
local strMessage = _tblErrorMessages[nError];
Dialog.Message("Error", nError);
Dialog.Message("Error","An error occurred:\r\n"..strMessage,MB_OK,MB_ICONSTOP);
end

zaknbou
02-27-2009, 01:11 PM
dear sir i really appreciate it if you can apply it on my attached file and then upload it again, i am a newbie :o plz
thanks in advance.

Edited: and please could you tell me about the second option too...writing the input data to a text file then attach it ...

holtgrewe
02-27-2009, 01:21 PM
I'm sorry, I can't do that.
If you have gotten as far as you have on your own, even a noob can copy code...try it, you may surprise yourself.

All I have shown you exists either in the help file or the forum.
Please use the help file and Forum search - it's all there.

zaknbou
02-27-2009, 01:35 PM
dear sir i know nothing about codes the "send email code" i just use it
from the templates files inside AMS (copy paste ) so i haven't gotten as far as i have on my own,
i wasn't trying to be lazy but i don't know where should i paste,
even though i did on the "send" button but it didn't work ,
i will really appreciate it if you tell me where to paste it or help me with that by uploading the file for me :o
thanks in advance holtgrewe

Best Regards