- This topic has 42 replies, 13 voices, and was last updated 11 years, 2 months ago by support-octavio.
-
AuthorPosts
-
kaza007MemberThis message has not been recovered.
J2OMemberIs there any update on a step by step process for creating a contact form? I want to have a simple form that sends data to an email address WITHOUT opening the mail client, this is one of the most common things on a website however I cannot find the answer anywhere. Any help would be appreciated I have spent days trying to figure this out, the mobione program is good except for this rather large frustrating issue.
kaza007MemberHi J2O,
have you tried Wayne’s simpleton form? It is the 4th post on this thread.I don’t think you can send an email without opening an email client. How does the email get sent without it?
kaza007.
J2OMemberHi kaza007
What I mean is a form that just posts the information to an email address, exactly like a contact form on a website would do, is there a step by step process for doing this?
I have successfully managed to create a form that just opens email client however then the user leaves the app to submit the information which I don’t want, I also don’t know how to open the custom javascript file within mobione either to try Wayne’s version (I am a bit of coding newbie)
J2O
MelKokaMemberwas there an answer to this query? – i am having the same issue
kaza007Member@J2O,
try downloading my example. You will need to extract the zip file into your server folder to run it.Dont forget to edit the send.php file with your email details.
This will give you a true contact form experience.
fchongMemberHi Kazaa
I have downloaded your apps but there is no mobi form there just the contact.html. Am i missing something here
kaza007MemberSorry,
try the attached file.Attachments:
You must be logged in to view attached files.
fchongMemberHi kazaa
Thanks for the mobi file. i have downloaded it and got a little problem trying to make it work as you mention that the send.php file have to be uploaded to the server. it this file possible in any server and i just need to change the url to point to it.
Appreciate your assistance
FC
kaza007MemberFC,
change this line of code in send.php to the email address where you want the contact details to be sent to.$recipient = 'youremail@address.com';
Upload send.php to your server. Make sure it is in the same folder as the html files and the contact_custom.js file.
IMPORTANT…make sure your server is running PHP otherwise it will not work.
rmpnetMemberHello everybody.
let me start with saying what a great piece of software this is.
i’m new at this so it might be a stupid question but when you say to upload to the server, how does the app know the address of the server?
i couldn’t find a link to it to change.
Also:
i’ve implemented the contact.mobi to my app, then i copied the send.php file to the app-www folder but the thatnk you message is always visible.any help is welcome and a step by step would be even more appreciated 🙂
rmpnetMemberOk i figured out that both the HTML file and the custom.js file have to be modified by hand after compiling the app.
I added the display style Kaza mentioned in the first page of this thread to the html and i added the following code from Kaza file to the xxx_custom.js file:/** * Called when send buton is pushed. */ $('#m1-contact-push1').live("click", function() { var url = 'send.php'; var error = 0; var firstname = $('#m1-contact-firstname').val(); var surname = $('#m1-contact-surname').val(); var email = $('#m1-contact-email').val(); var phone = $('#m1-contact-phone').val(); var message = $('#m1-contact-message').val(); if(firstname == '') { error++; } if(surname == '') { error++; } if(email == '') { error++; } if(message == '') { error++; } if (error > 0) { alert('Tutti i campi devono essere riempiti.'); } else { //submit the form //---------------------------------------------------------- $.ajax({ type: "GET", url: url, data: {firstname:firstname, surname:surname, phone: phone, email: email, message: message}, error: function() { alert('Messaggio non spedito. Prego riprovare.'); }, success: function() { $('#m1-contact-firstname').hide(); $('#m1-contact-surname').hide(); $('#m1-contact-email').hide(); $('#m1-contact-phone').hide(); $('#m1-contact-message').hide(); $('#m1-contact-push1').hide(); $('#m1-contact-text2').show(); } }); //$.ajax //---------------------------------------------------------- } //if else return false; });
now i have one last question.
when i get back to the page during the same session it will display the “thank you” message.
I would like to be able to send as many messages as the user whats, so when a i go back i’d like to find the form again. how is that possible?
Thx again
support-octavioMemberYou can use either:
phoneui.gotoPage(“m1-mainscreenName”);
or
phoneui.back();
at the end of your success function in the ajax call.
rmpnetMemberHi support-octavio and thx for your replay 🙂
i’ll try that right now (i did a button that would invert the hide/show option bringing back the forms, but this might be better).
In the mean time i’ve compiled the android and iphone apps and loaded them on the respective phones but no email is sent 🙁
it all seem to work grafically but no mail, any suggestions on that?
thx again in advance 4 your help 🙂Edit: tryed both phoneui commands and they bring me back to the main screen but they don’t reset the forms.
support-octavioMemberHi rmpnet,
The email is not sent because the php file that receive data and send email is not hosted in a php server.
>Edit: tryed both phoneui commands and they bring me back to the main screen but they don’t reset the forms.
The code I provided just return to screens but to reset form you should use a snippet such as:phoneui.resetForm('m1_formName');
-
AuthorPosts