Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
panchopepe
Posts: 30
Registered: ‎06-22-2012
My Device: Blackberry Curve 8520
My Carrier: Movistar

Contact Form

Hello! I am developing a apps for playbook, but I don't found the way to make a form that works with ajax (do not with php as I have configured) ,when the user sent his data, this show a page of thanks, and send the information to my mail, Someone who can help me, I'll be very grateful

 

 

Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Contact Form

Do you have a piece of source you can add here to figure out where the problem is, Ajax or PHP.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Developer
panchopepe
Posts: 30
Registered: ‎06-22-2012
My Device: Blackberry Curve 8520
My Carrier: Movistar

Re: Contact Form

My code is in PHP, but I want to do in Ajax, to run client-side, attach sent my code 

 

<form action="processForm.php" method="post" data-transition="pop">

<div data-role="fieldcontain">
<label for="senderName">Tu nombre</label>
<input type="text" name="senderName" id="senderName">
</div>

<div data-role="fieldcontain">
<label for="senderEmail">Tu E-mail:</label>
<input type="email" name="senderEmail" id="senderEmail">
</div>

<div data-role="fieldcontain">
<label for="message">Comentarios</label>
<textarea name="message" id="message" placeholder="Por favor escribe algo" required="required" cols="80" rows="10" maxlength="10000"></textarea>
</div>

<input type="submit" name="sendMessage" id="sendMessage" value="Send Email">

</form>

Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Contact Form

[ Edited ]

So you need to learn Ajax, isn't it? I think there is a huge list of tutorials out there using Google. This one could be a starting point: http://www.queness.com/post/160/create-a-ajax-based-form-submission-with-jquery

 

In 3. Javascript replace the

 

//this is the php file that processes the data and send mail
url: "process.php", 

with the url you are using

 

url: "processForm.php", 

and remember to do a remote call to your server, so the url should contain the domain-name/ip to work together with your server.

 

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Developer
panchopepe
Posts: 30
Registered: ‎06-22-2012
My Device: Blackberry Curve 8520
My Carrier: Movistar

Re: Contact Form

Thanks a lot!

Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Contact Form

NP. Hope you get/got it working in every case! Leave a message if not.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Developer
panchopepe
Posts: 30
Registered: ‎06-22-2012
My Device: Blackberry Curve 8520
My Carrier: Movistar

Re: Contact Form

Hello, in the case a playbook tablet , if I don't have a server to manage the Php request, how can I configure this form, to receive mail from user?, thanks

Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Contact Form


panchopepe wrote:

Hello, in the case a playbook tablet , if I don't have a server to manage the Php request, how can I configure this form, to receive mail from user?, thanks


Mhh. I think sending emails from within an app isn't quite possible but maybe you can invoke the email application? Have a closer look to the invoke API and perhaps search for invoking email app here in the forum or have a closer look to this thread: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-programatically-send-emai...


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.