View Full Version : flash form
gavinv3
10-17-2007, 04:35 AM
Hi,
I need help with a form.
Can a form be created in flash without any php linking - which on submit will provide a text area that has the information formatted in a nice order
Regards
Gav
BLiZZaRD
10-17-2007, 06:57 PM
Yes... but there are very small uses for this... You as the owner won't get any information from it, the user will input information and click submit, and be shown the same information. I made a quick example to show you one way.
If you can tell us exactly what you hope to do with it there might be a better solution....
gavinv3
10-17-2007, 07:24 PM
Hi Blizz,
Thanks indeed - Wish you all the best in your task.
I have an actual working examples of what I actually want. however they used php, the first one is the form and when you hit the generate template button the second file is what the outcome is.
Infact it is not for customers - but at work we have to type notes - instead I just want to make a form that will help us tick and click and type a few words here and there and get the documentation completed - so we can concentrate more on what we speak rather then type
here is the form [sorry I am not so savy with how to send you the code so I am just pasting it here]
<HTML><HEAD><TITLE>DSLAM RESET</TITLE>
<link href="../../../default.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style3 {color: #000000}
.style5 {font-size: 10pt; color: black; background-color: #EFEFEF;
font-family: Arial, Verdana, Helvetica, sans-serif;}
-->
</style>
</HEAD>
<SCRIPT>
var dSlam = false;
var mOdem = false;
var dId = false;
<!-- this script is for checking for required fields --theDVZ -->
function verify() {
var themessage = "Please complete the following fields: ";
if (document.getElementById("Username").value=="") {
themessage = themessage + " - Username";
}
var isChecked = false;
for(i = 0; i < document.dslamFRM.HastheDSLAMbeenResetbefore.length;i++)
{
if(document.dslamFRM.HastheDSLAMbeenResetbefore[i].checked == true)
isChecked = true;
}
if(isChecked == false)
themessage = themessage + " - Has the DSLAM been Reset before";
if (document.getElementById("PreviousResetPRs").value == "" && dSlam)
{
themessage = themessage + " - List previous Reset PRs";
}
var isChecked = false;
for(i = 0; i < document.dslamFRM.Numberofphonesockets.length;i++)
{
if(document.dslamFRM.Numberofphonesockets[i].checked == true)
isChecked = true;
}
if(isChecked == false)
themessage = themessage + " - Number of phone sockets";
if (document.getElementById("CPEcurrentlyconnected").value=="") {
themessage = themessage + " - CPE currently connected";
}
var isChecked = false;
for(i = 0; i < document.dslamFRM.Samemodemusedaslastreset.length;i++)
{
if(document.dslamFRM.Samemodemusedaslastreset[i].checked == true)
isChecked = true;
}
if(isChecked == false)
themessage = themessage + " - Is it the same modem used as last
reset";
if (document.getElementById("DIFmodem").value == "" && mOdem) {
themessage = themessage + " - Type / Model of different Modem";
}
var isChecked = false;
for(i = 0; i <
document.dslamFRM.Modemsamesocketsincelastreset.length;i++)
{
if(document.dslamFRM.Modemsamesocketsincelastreset[i].checked == true)
isChecked = true;
}
if(isChecked == false)
themessage = themessage + " - Is the Modem in the same phone socket
since last reset";
var isChecked = false;
for(i = 0; i < document.dslamFRM.didit.length;i++)
{
if(document.dslamFRM.didit[i].checked == true)
isChecked = true;
}
if(isChecked == false)
themessage = themessage + " - Did the DSLAM reset resolve the issue";
if (document.getElementById("actioN").value == "Troubleshoot as per
Procedure" && dId) {
themessage = "NO IFMS REQUIRED AS NOT RESOLVED - Troubleshoot as per
Fault Type";
}
//alert if fields are empty and cancel form submit
if (themessage == "Please complete the following fields: ") {
return true;
}
else {
alert(themessage);
return false;
}
}
</SCRIPT>
<BODY>
<table width="600" border="0" align="center" cellpadding="5">
<tr>
<td class="emphasis2"><strong>I need a script that will convert the information
filled in the following fields to appear like in the next file</strong></td>
</tr>
<tr>
<td class="emphasislite"><strong> This is an actual working form - the only
issue is this one is using a php on the server end - what I want is a javascript
which does not need a backend that will proces the form as you see in the
next page [code pasted]</strong></td>
</tr>
</table>
<form name=dslamFRM enctype='multipart/form-data' action='process.php'
method='post' onSubmit="javascript: return verify(); ">
<table width='600' border=0 align="center" cellpadding="5">
<tr class="table">
<td width='323'><strong> Name : </strong></td>
<td width='251'>
<input type=text name='Username' id='Username'></td></tr>
<tr class="table">
<td width='323'><strong> Has the clock been Reset before : </strong></td>
<td width='251'>
<input name="HastheDSLAMbeenResetbefore" type="radio" value="YES"
onClick="document.getElementById('hide1').style.display = 'inline'; dSlam
= true;"><b>Yes
<input name="HastheDSLAMbeenResetbefore" type="radio" value="NO"
onClick="document.getElementById('hide1').style.display = 'none'; dSlam =
false;">No</b></td>
</tr>
<tr class="table" id="hide1" style="display:none">
<td width='323'><strong>If <span class="redbold">YES</span> above,
List previous Reset PRs :<br>
</strong></td>
<td width='251'>
<textarea name='PreviousResetPRs' rows=5 cols=10></textarea></td></tr>
<tr class="table">
<td width='323'><strong> Number of watches : </strong></td>
<td width='251'>
<input name="Numberofphonesockets" type="radio" value="1"><b>1
<input name="Numberofphonesockets" type="radio" value="2">2
<input name="Numberofphonesockets" type="radio" value="3">3
<input name="Numberofphonesockets" type="radio" value="4">4
<input name="Numberofphonesockets" type="radio" value="5 or More">5
or More</b></td>
</tr>
<tr class="table">
<td width='323'><strong> Please explain the nature of the defect</strong></td>
<td width='251'>
<textarea name='CPEcurrentlyconnected' id='CPEcurrentlyconnected'
rows=10 cols=35></textarea></td></tr>
<tr class="table">
<td width='323'><strong> Is it the same watch used : </strong></td>
<td width='251'>
<input name="Samemodemusedaslastreset" type="radio" value="YES"
onClick="document.getElementById('hide2').style.display = 'none'; mOdem =
false;"><b>Yes
<input name="Samemodemusedaslastreset" type="radio" value="NO"
onClick="document.getElementById('hide2').style.display = 'inline'; mOdem =
true;">No</b></td>
</tr>
<tr class="table" id="hide2" style="display:none">
<td><strong>Type / Model of the watch</strong></td>
<td><input name='DIFmodem' type=text id='DIFmodem'
size="20"></td>
</tr>
<tr class="table">
<td width='323'><strong> Is the watch in the same box : </strong></td>
<td width='251'><input name="Modemsamesocketsincelastreset"
type="radio" value="YES"><b>Yes
<input name="Modemsamesocketsincelastreset" type="radio"
value="NO">No</b></td>
</tr>
<tr class="table">
<td width='323'><strong> Did the change satisfy the customer: </strong></td>
<td width='251'>
<input name="didit" type="radio" value="YES"
onClick="document.getElementById('hide3').style.display = 'none'; dId = false;"><b>Yes
<input name="didit" type="radio" value="NO"
onClick="document.getElementById('hide3').style.display = 'inline'; dId = true;">No</b></td>
</tr>
<tr class="table" id="hide3" style="display:none">
<td><strong class="redbold"> If NO ACTION TO TAKE ==>
</strong></td>
<td>
<input name='actioN' type=text id='actioN' readonly
value="Troubleshoot " size="32">
</td>
</tr>
</table>
<div align="center">
<input type='submit' value='Generate Template'>
<input type=reset value='Clear Form'>
</div>
</form>
</BODY></HTML>
gavinv3
10-17-2007, 07:25 PM
<script language="JavaScript">
// Copy and Clear Function
function ClipBoard(){
Copied = dump.createTextRange();
Copied.execCommand("RemoveFormat");
dump.select();
Copied.execCommand("Copy");
}
</script>
<link href="../../../default.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-family: "Comic Sans MS"}
-->
</style>
<h2 class="emphasis">COMPLETED </h2>
<br />
<table width="600" border="1" align="center" class="table">
<tr>
<td>
<div align="center" class="table"> <br />
<textarea cols="60" rows="10" name="dump">
Name : fff
Has the clock been Reset before : B4: NO
Number of watches : 3
Please explain the nature of the defect ffff
Is it the same watch used : YES
clock in same socket since last reset: YES
Is the watch in the same box :YES</textarea>
<br>
<input type="button" value="Copy Above for IFMS COMMENTS"
name="capture" onclick="ClipBoard()">
<br><br>
<input type="button" value="Return to Template" name="back"
onclick="window.location='form1.html'">
<br />
<br />
<br />
</div></td>
</tr>
</table>
gavinv3
10-17-2007, 07:27 PM
Now this is an html file - this is for the example - as to what I want to achieve - I hope I have made it clear. I will be checking the file you sent me soon
Thanks again Blizz
BLiZZaRD
10-17-2007, 07:42 PM
Okay.. had a look... the example I gave will (should) work just fine. You make the input boxes for the text to input, make the static text to tell you what to put. You can even make check boxes that return a yes or no value if you like. On the second frame make the dynamic boxes and viola, a tiny bit of AS and your done. You can put it on the server or webspace and all employees can use it.
Any other features can be easily added as well (save to text file, clipboard etc)
If I can do anything else, let me know :)
gavinv3
10-18-2007, 01:53 AM
Hi Blizz,
I dont have the latest version of flash which will open the file you sent me. If you could save it to a bacward compatible version like version 5 or MX 2004 and send it to me.
I installed the trial version of the latest flash soft today and was able to view the file.
To be precise I want the information typed in the text boxes [on the first screen] to appear on the next screen after clicking on the submit button in a Text area or in a way it can be coppied to the clipboard as simple text
-- Or best would be - instead of the submit button we can have a button that will copy the information filled in the text boxes to the clipboard - is that possible
Regards,
Gavin
gavinv3
10-19-2007, 07:32 PM
Hi Blizz,
Can you construct a from with a text box, a check box, a radio button and a text area and a button that will copy the stuff entered to the clipboard. Preffibly do save it to version 5, that would be very much appreciated.
Regards
Gavin
BLiZZaRD
10-20-2007, 02:54 PM
I can do something yes... give me a little bit to catch up and get moving (at work and we have been without power for 2 days, I am a scrambling man at the moment :) )
I should have something up in a few hours. If not then I will post back with an ETA :)
BLiZZaRD
10-20-2007, 08:36 PM
Okay.. here is the next attempt. It has a check box, a radio button a name input and a text input.
All are sent to the next page and there is a copy button that will copy it to the clipboard so you can paste it where ever you need to (email, notepad, etc)
There is a submit button (to go to page 2) a copy button and a return button (to go back to page 1)
If I get time tonight I will finish it up, other wise I will do it in the AM (about 16 hours from now)
Left to do: Context/spacing of the submitted text. Making input field visible/invisible depending on the previous choices.
Enjoy (it is made in Flash 8, published in Flash 7 -which is MX 2004)
gavinv3
10-21-2007, 03:39 AM
Hi Blizz,
That was fantastic - You have done great in the current file - I have done some modifications - I have attached the file ' I did not know how to put a dropdown list box there so I just typed it to inform you'
- The check box is behaving like a Radio button - Also the info will have to appear one below the other. I need to add a Drop down list to it - for example - 'OS used' - Should have diff operating system names which we can select.
Blizz, There is something missing - that is : When the name is typed in the first box - on the next screen - it should appear as:
Client Name: John -- [for example]
Currently the next screen only shows the info typed in the text box
The end result of this form should appear as follows:
*************End Result**********[Considering the fact OK and TPA is ticked][There should be 3 to 4 spaces between the name and the ID word - if that can be done]
Spoke to: John ID: Ok (TPA)
Operating System used by the customer: Windows Vista
A/C details updated: DOB
- The modem was replaced and the issue was fixed -- [Info typed in the Additional Info box]
**************************************** [Considering the following text was typed in the box ] [Here the word 'Additional info:' should not appear - Also there should be be a double line spacing where this box appears from the rest of the above checkboxes - when the data is formatted]
[I am sorry I might have messed up the code as I tried to copy past things here and there when modifying the file I sent you - Blizz, this will be a lengthy form - hence the form will contain lots of check boxes, dropdown options and lots of textboxes and textareas where information can be fed in - In the end do let me know if I need to duplicate the check boxes or what variables to assign to the sequences that will be added to it in AS]
Thanks Blizz - You have been very helpful, Thanks again,
Warm Regards,
Gavin
gavinv3
10-21-2007, 10:32 AM
I have graphically designed a form - what I would be intending to to do - in the snapshot - I have placed dropdowns etc.
The text below shows how the information will be formatted after hitting the submit button
BLiZZaRD
10-21-2007, 06:52 PM
Okay, I will have time when I get home today to look at your things and see what I can do for you.
I wasn't expecting to do the whole thing, I was just showing you the code. But I have no problems doing it, it will just take a while longer than I expected.
I should be able to make it look just like your picture there, or as close as my graphically challenged mouse will let me. :)
Look for a post later today/tonight or early tomorrow.
Also, just FYI, the minimum I can do this in is Flash 7 (MX 2004) as the AS involved needs AS2 and anything earlier than 7.0.0 won't run the scripts correctly.
BLiZZaRD
10-22-2007, 05:39 AM
Look at me double posting! sigh...
Okay I am working on the form, and I have a few thoughts. First, if I am to do this completely for you it will need to be in FLash 8 completely. I will be using combobox options and advanced AS2 techniques that 7 and lower can't handle.
I need to know if that is a problem. (there are ways around it) I can't do anything for Flash 5, sorry AS1.0 just can't handle very much AS and I am NOT tweening drop down boxes with multi-hit options.
If MX 2004 Pro is fine for you then that will work. What I need from you though is all the options. Meaning:
In your picture (which is what I am going off of) you have a selection for OS's. What are the options you want shown there? I can fill that thing up with 100's of OS's, but I am sure you would rather just have an "Other" category.
So please list for me each and every option that I can not see in the photo. This may take longer (it is a large form, you were right) but I think the end result will be worth it. And besides I need another side project. :D
Okay.. made a list... I need a list for contents for the following:
Drop down menus: ID not done, Issue, OS, Modem/Router
Text boxes: are any visible when a certain box is checked? if so, which ones, and where?
Anything else special happen when form is filled out? If so, please list it here as well. :D
BLiZZaRD
10-22-2007, 07:22 AM
Ohhh A triple Post!
I have the basic form done, with drop downs filled with choices I made up. Personally I think it looks pretty nice, but I am biased.
You can see for yourself, and as of yet there is no submit button, because I need that other info from you first.
If you like what you see, and get me the info we can move on to the next part, which is making the page with all the input details ready to copy and paste!
Because size is an issue with the FLA I have only included the .swf (final) version. You can at least view it and test all the buttons and drop downs :D
gavinv3
10-22-2007, 12:30 PM
Thanks a Million Blizz,
No worries you can create it in any version you like as I have downloaded the trial version of the latest flash software which will help me view it
I will be checking the stuff you sent me later today when I get home - You can proceed with any version of your choice
Incase you need to email the file you can do so at gavinvaz@yahoo.com
Thanks again
BLiZZaRD
10-22-2007, 02:38 PM
Well, it's not so much what I want, it's more what Flash needs. LOL
Let me know about those questions so we can continue :D
gavinv3
10-22-2007, 06:03 PM
Hi Blizz,
I worked on the form design and the options - I have attached a zip file - as the contents of the files are too large - I have seperated the zip files into 2 - you will have to unzip the files to one folder
gavinv3
10-22-2007, 06:07 PM
This is the second zip
There is one more that contains the images - coming up next
gavinv3
10-22-2007, 06:10 PM
Hi Blizz,
This is the 3rd zip file - I am sending the snapshots of the form to you in the next posts
gavinv3
10-22-2007, 06:11 PM
1st snapshot
gavinv3
10-22-2007, 06:11 PM
2nd snapshot
gavinv3
10-22-2007, 06:12 PM
3rd snapshot
gavinv3
10-22-2007, 06:16 PM
Hi Blizz,
This is the 4th snapshot - I have set all the options in the files that I sent - I actually designed the form in Coffee Cup software - which actually created a flash file which is wierd - it does not open the swf file in IE - rather its kind of an XML file
I hope you will find the options I have embedded into the form while you create it for me
Talk to you soon
Gav
BLiZZaRD
10-22-2007, 08:03 PM
Are you kidding? Anything else you going to throw at me in the last minute? Wow..
Okay I will take a look as soon as I can.
gavinv3
10-22-2007, 11:31 PM
Hi Blizz,
I didn't mean you do all the dirty work - Please dont misunderstand - I thought the more info I send you will help [Sorry about sending so much together] [I really appreciate all that you have done for me so far and what you are doing - Dont know how to thank you] - I sent the files just to show you what the form would all comprise off (As you were waiting for the options and what to select in the dropdowns) - however I have not finished it - I will add the rest to it myself- I tried to do as much as options for you to work on.
Do let me know if I need to duplicate the check boxes or what variables to assign to the sequences that will be added to it in AS for further additions
I would like to know how the documentation would turn out to be - Waiting to see a glimpse of it
That zip file I sent - contained some kind of a flash file that used xml - I thought that would help and make the task easier for you. Once you save all the files to a folder and run the notes.html file it kinds of simulates a flash file but the actual .swf file does not have the info. Sorry to make things difficult - infact I thought It would help.
Thanks again
Regards
Gav
BLiZZaRD
10-23-2007, 02:57 PM
No worries... I just thought we were being close to done and then I see 3 more pages, LOL.
I will finish building the form, then make page 2 which is the text. I have already done page 2 and tested it, it works now, separate lines and spacing etc. Copied to the clipboard on button press, etc. etc.
Once the form on page 1 is completed then it should be a done deal. I will have to redo the functionality of it to make room for the last 3 pictures you posted. Once done with that I will open your zip files and get the info I need from them. Then I will create, test and complete. I will write an HTML page for you to use as a stand alone page instead of using the internet, then all you will have to do is copy the files to each persons computer, and ensure they have Flash Player 7 or later :)
It will take me a little bit of time though as right now it is mid-football season (I am a high school FB coach) and we are in a do or die push right now. I only get to work on Flash at work, when I should be sleeping, and a TINY bit at home late at night (after I finish playing Wii and Xbox 360 :D )
I will get it done for you no worries, just give me a bit of time, yeah?
gavinv3
10-25-2007, 06:20 PM
Thanks Mate,
All the best to you and your football team.
Blizz, I would suggest you take a snapshot of the form in action - thats after putting the zipped files together and then open the notes.html file - as the snapshots I sent you are of very low resolution due to size constraints. Well if you think thats a good idea. I would like to know which country you are in - by the way is that your snap? . .
BLiZZaRD
10-27-2007, 05:45 PM
I am about half way done with this. Should finish up tomorrow some time and have a working example by Monday morning to you. That is providing I don't run into any SNAFU's and all goes well at home (meaning wife will let me work on the computer :p )
I am in the US, and I hae a real pic somewhere in this forum, I think....
BLiZZaRD
11-02-2007, 02:28 AM
Okay, so things haven't gone as planned. I really don't want to keep you waiting on this, so here is my offer:
I am working on the last bits of it now, should have something later tonight (US PST Time). I will not dwelve into graphics and exacting layouts, but everything will be there.
Everything will work and be ready to go.
If you don't like the style or want to add pictures etc. you can feel free to edit everything as you see fit.
I will make it work great and be to your specs. After you have it how you want if it no longer works or something is wrong I will help you fix it.
Basically I will make the skeleton you make the skin. Deal?
See you in a bit :)
The submission part is going to take me a while. For now I will let you see the completed page 1 of the form. Because of the size (the actual pixels not the file size) I have included the HTML and the SWF. open the HTML to see it in true size. Also note the submit button works, but nothing is generated in the page 2 text yet. Working on that, but it may be several hours yet - I need a nap :)
Download files here (http://cleverwasteoftime.com/blizzcorner/FlashForm.zip)
gavinv3
11-04-2007, 08:26 AM
Yes thats a Deal,
I will do all the graphical changes - do give me a brief of what variables and how the objects in the file - for eg. the text and check boxes relate to AS - So that I can add more check boxes and edit the text it will throw when checked.
Thanks for helping selflessly,
Just like to let you know one thing that needs a little change in the current form you sent - it is the Textarea - it is not a Multiline [which can wrap text in itself - it is just a single line box - Could you make it a multi line [ I am referring to th e big boxes under every topic where an additional note can be typed
I liked the submit button you made at the end - Can the edge of the flash file be white as it shows a black line around it?
I am so excited to see the 2nd page that will format the data like a text note
BLiZZaRD
11-04-2007, 06:03 PM
Yup. Fixed that already. The form is complete and in all it's glory now, just working on the AS for the display/copy text. It is a lot to write, but hopefully I can finish within the next 3 hours. If not I will be very close. Everything has been tested and works pretty well. And everything is pretty self explanitory in the AS. There are two main spots for AS, the Scripts layer hold the copy text stuff and each radio, combo or check box has a little on each of it.
Just FYI...
This form is 2880 pixels high, with 2 radio buttons, 19 combo boxes, 25 input boxes, and 76 check boxes.
That's the largest form I have ever made. LOL. The code itself is easy, just there is so much of it and a lot of back and forth back and forth... it is taking me a long time to type.
Anyway I better get back to it if I am going to finish today.
have completed the form... you can find it HERE (http://outsidetheurl.com/FrozenCoyoteLabs/Downloads/) It's the only link on there. Enjoy!
gavinv3
11-05-2007, 03:39 PM
Blizz,
This was really a great job. Thanks for all your efforts and hard work.
You are very reliable and you really reach out to everyone with an open heart. I dont think anyone would take that extra step to go out of their way and spend their precious time day and night to help. I know I gave you a lengthy task. Also a special thanks to your family for allowing you to complete the form for me.
Now we will be communicating on the minute details or in other words - working of the form - I would prefer creating a new thread "Form Processing" for it as it will be more technical
***********************Very Imp.?*************************
- The options that haven't been checked - show as 'undefined' in the output text - can that be eliminated?
- I want only the boxes that are checked to included in the final text / the same with the text boxes - if not filled up then the info should not populate in the final result
Is this possible?
Thanks a Million
Warm regards
Gavin [KnightHawk]
BLiZZaRD
11-05-2007, 03:49 PM
Glad you like it. we can get technical now that you and I are looking at the same thing :)
to answer your questions:
yes, it is possible. Exactly how you want to do it and what is the most feasible way for you is the question. I thought about doing that from the beginning, using arrays and whatnot to populate the text field. However I didn't think you would get a hold of the file with an understanding of HOW it works.
Now that you (hopefully) understand we can move on to either re-coding the whole thing, or finding other "hacks" that will work :D
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.