Log in

View Full Version : Floating form filler



neo_philiac
12-16-2008, 08:15 PM
OK Guys this is a bit complicated. I am going for something here! I don't know what it is yet so bear with me.

I have a simple form with a text area that i submit and I save the data. Normally I would just type in the text area and type the information and I hit submit. But I want to assist the user to fill that text area by opening a window (a floating form) so that whenever the user clicks to fill the text area, a window will appear and the user will fill the appropriate fields and lick submit. This submission will take the information parse it in simple text and put it in the text area.

For example:

The form (floating window/form) will have the following fields:
Name:
Address:
Phone:

Now when I fill this form, the floating form will parse this data and just put it in order - John Doe,123 Road St, 123-456-7890 and put this information in the text area. Simple ? - HUH !

I would really appreciate if anyone can help. Since I dont know where to put this, I will just leave it in general. I believe this is strictly client side. This is sort of dynamic form filler.

Nile
12-17-2008, 01:10 PM
I don't know if this is what you want but you can give it a try:
http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

neo_philiac
12-17-2008, 02:25 PM
Thank you for the reply but no this is not what I was looking for.

To explain things more here what I want:

In a php script I have this line


echo "<input type=\"hidden\" name=\"stack_date[".$array_num."]\" value=\"".$date[1]."\">";

Now I want the user to set the value of the input by clicking an edit button or a pop up window. Here is a picture. It is not real but gives you the idea.

http://www.kimlab.pitt.edu/Internal/Picture%203.png

Any help?

Nile
12-17-2008, 10:38 PM
Something like this?
http://www.dynamicdrive.com/dynamicindex5/balloontooltip.htm

Snookerman
12-17-2008, 10:46 PM
I think the OP wants the tooltip to work as a form, not just a regular tooltip.

Nile
12-18-2008, 12:53 AM
It's possible. You'd just need a little extra coding.

neo_philiac
12-18-2008, 02:38 AM
Thank you guys! Nile - That's a tease, please tell me how it can be done :) Spookerman - you are right! I need a form to fill out a form (no its not a typo - I want a form to fill a form!). In the picture The gray box that you see (with -skating etc in it) is a form field (textarea) itself ; it does not have to be!! This floating form can be invoked by clicking an edit button. I am just trying to give the user the privilege to (or restrict!) fill out the form properly (you know how users are!!) also give user the fancy calendar input functionality. So basically, the way i see it is to manipulate the value of $date[1] to serve my purpose dynamically.

Thanks a lot guys ;)

Medyman
12-18-2008, 03:40 AM
In logic it would be something like this:

You have two forms: a parent form and a "helper" form. The "helper" form would consist of a few text fields. When one submits the "helper" form (probably easier to use a button element), the values of the text fields would get concatenated, formated in some way, and the content set equal to the value of a textarea in the parent form.

It's all actually very simple manipulations of the DOM. Now, having said that, that simplicity is beyond my JS skills. So, I can't help with actual code. But hopefully this helps someone with the knowledge to code something up for you.

Now, if you wanted to use jQuery, I could help you there as I get jQuery.

neo_philiac
12-18-2008, 03:26 PM
Madyman!!!! Long time no post! ( In case you dont remember me - you helped me a lot with action scripts!)

I couldnt explain it any better myself. Thank you Medyman. What you explained is exactly what I want. I do see the live examples of jQuery an it has a lot of potential - i must say! But is this something you need to install on the web server like a PHP package? Or is it just a set of scripts ? Because I dont have conmtrol over the web server. But I can ask for it. The other thing is that the web server is a windows IIS (don't ask!). If this is something I can use, I would welcome any suggestion.

Thanks guys again!

Snookerman
12-18-2008, 03:37 PM
jQuery is a library, all you need to do is go to the jQuery site (http://jquery.com/), download the file and put a link to it in your page. You can also link directly to the file if you can't place it on your server. Here is the link to the latest version:

http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js

neo_philiac
12-19-2008, 02:59 PM
Hey Medyman can you help me by starting off with an example?

neo_philiac
01-05-2009, 04:48 PM
Anyone has an example? Actually what I was thinking that if we need a form inside a form at all or use a javascript popup 'form' to add that certain information in the value variable. Am I making sense?

Snookerman
01-05-2009, 04:55 PM
Here is a good tutorial to get you started with jQuery:
http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-video-series/ (http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-video-series/)