Wisebisoft - Adobe Flash, Flex and AIR.

Share and Experiment

Advanced Flex 3.0 Contact Form

with 4 comments

To make things a bit different, I decided to create a Flex 3 Contact form just to show all the “anti-Flex” people out there that Flex is not only for hardcore development and ugly graphics. With a bit of effort and time, anyone can produce really good looking applications in Flex Builder too ( and I didn’t even bother using graphics with this example, I only edited the look of the component and I think that the results is quite good ).

Final result ( sneak peek ):

































I didn’t want to complicate stuff to badly with this example, my goal was to create a good looking and clean Flex 3 contact form ( I’m sure that many of you guys out there are really bored of all those simple Flash contact forms ) and obviously, to add more “advanced” features. To spice things up a bit, I played around with Shared Objects too. Once the user sends the E-mail he’ll be provided with an option “Save personal information or Not”. Ok, what does this do ? Well, it simply creates a shared object and stores your personal information on your computer for later use. This way, whenever you open your PC and visit this site, you’ll always have certain fields filled out, saving you time.

Obviously, this can be done more complexly too, shared objects aren’t really hard to use but it’s a decent example on how to use them and once you understand how they work then you can experiment with your own stuff ( for example: create a shared object for your games so that when users revisit the game then they’ll already have the Name filled out… or any other features ), it’s really up to everyone’s imagination.

The working example can be viewed here: Working Example
You can download the source files from here: Advanced Flex 3 Contact Form

Of course, the source files contain both .mxml and .php files that were used when I created the example. I really hate downloading examples that are only partially working ( although they have their ups and down ) so I decided to always provide all my files when posting an example so that anyone can easily play around with it and hopefully learn something from my examples.

Enjoy.

Written by Biro Barna

October 26th, 2008 at 2:16 pm

Posted in Flex, PHP

4 Responses to 'Advanced Flex 3.0 Contact Form'

Subscribe to comments with RSS or TrackBack to 'Advanced Flex 3.0 Contact Form'.

  1. Hi,
    I have installed the advanced contact form,
    and uploaded it, but it does not work,
    Do i need to recompile it in flex before uploading, If so then do i need to set the server setting.
    Your advice will be highly appreciated
    Thanks
    Sonny

    Sonny

    25 Jan 09 at 9:33 am

  2. Hi there,

    Actually there’s nothing that needs to be installed… All you need to do is to upload the .swf file with the .html file ( that embeds the .swf file ) on your domain and make sure that you copy the PHP script file too ( because that’s the one responsible for sending the E-mails ). So you’ll need 3 files to get it working ( although you could use only the .swf and the .php file too but it’s recommended that you embed the .swf file in HTML and display it that way ).

    Check if you uploaded these files correctly, if you had, then check if you hosting plan has PHP support because if your hosting plan is a free one then it’s not likely for it to have PHP support ( and you’ll definitely need PHP support, otherwise the PHP script won’t work ).

    All the best,
    Biro Barna

    Biro Barna

    25 Jan 09 at 11:26 am

  3. Hi there Biro,

    GREAT component and just what I was looking for, so thank you! I am reasonably good with Flex in terms of layouts and UI’s but not so hot when it comes to data and data management. I need to adjust your form to remove the Send To form item and have it mail automatically to an address I specify. I have tried a few things but it seems I am not getting something.

    Any help would be greatly appreciated! Again great component and thanks.
    Michael

    Michael

    16 Feb 09 at 8:08 pm

  4. Hi Michael,

    The easiest way to do this is to simply remove the upper TextInput field and add the E-mail you want the message to be sent to manually inside the PHP script that is responsible for sending the E-mail.

    Inside the PHP file you should have a variable called “$to” or something like that ( can’t really remember and I’m too tired to take a look now ), that’s the part where you need to add/assign your E-mail.

    It’s really not hard :) It’s way harder for me to explain the whole thing than actually do it ( it would take max. 2-3 steps ).

    Don’t give up, you can do it.

    Biro Barna

    20 Feb 09 at 6:55 pm

Leave a Reply