facebook

form send to email

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 16 through 30 (of 43 total)
  • Author
    Posts
  • #322454 Reply

    kaza007
    Member

    This message has not been recovered.

    #329290 Reply

    J2O
    Member

    Is 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.

    #329318 Reply

    kaza007
    Member

    Hi 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.

    #329423 Reply

    J2O
    Member

    Hi 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

    #330106 Reply

    MelKoka
    Member

    was there an answer to this query? – i am having the same issue

    #330108 Reply

    kaza007
    Member

    @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.

    #330294 Reply

    fchong
    Member

    Hi Kazaa

    I have downloaded your apps but there is no mobi form there just the contact.html. Am i missing something here

    #330318 Reply

    kaza007
    Member

    Sorry,
    try the attached file.

    Attachments:
    You must be logged in to view attached files.
    #330400 Reply

    fchong
    Member

    Hi 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

    #330401 Reply

    kaza007
    Member

    FC,
    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.

    #332533 Reply

    rmpnet
    Member

    Hello 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 🙂

    #332534 Reply

    rmpnet
    Member

    Ok 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

    #332548 Reply

    @rmpnet,

    You can use either:

    phoneui.gotoPage(“m1-mainscreenName”);

    or

    phoneui.back();

    at the end of your success function in the ajax call.

    #332559 Reply

    rmpnet
    Member

    Hi 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.

    #332711 Reply

    Hi 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');
Viewing 15 posts - 16 through 30 (of 43 total)
Reply To: form send to email

You must be logged in to post in the forum log in