AS3 Form with calculation.

Hey people,
I want a form, you can select items, and it calculates the total amount of all selected.
Option1 (checkbox, if checked +500 to total)
Option2 (checkbox, +10 to total)
Option3 (radio, +10)(radio, +20)(radio, +30 to total)
Total: total-amount of all selected items

if your checkboxes are cb0,cb1 etc, use:
var total:Number;
var cbValueA:Array = [500,600,200,etc];
for(var i:int=0;i<cbValueA.length;i++){
    this["cb"+i].addEventListener(Event.CHANGE,cbF);
function cbF(e:Event):void{
    total = 0;
    for(var i:int=0;i<cbValueA.length;i++){
        if(this["cb"+i].selected){
            total+=cbValueA[i];
    // do whatever with total

Similar Messages

  • Using iPad2 to fill PDF forms with calculating cells

    I currently have the PDF Expert app. installed.  I have created a PDF form with calculating cells and cells with multiple selections using Adobe Acrobat X Pro.  It works on my PC on 2 different PDF reader apps, however when I load it in PDF Expert on the iPad it does not calculate and the multiple selections aren't there.  It also does not keep the formatting of the cell.  I set the cells up as currency, however it does not show as currency once loaded in the PDF Expert app on the iPad.  Is there an app out there for the iPad that will allow PDF form fill in and will also show the cell formatting and calculations? Or is this a limitation caused by iOS? I have also tried Adobe's reader app for the iPad and it doesn't show it on there as well.  Any help would be greatly appreciated! Thanks!

    I'd be amazed if you could. I wouldn't think it possible to even open a PDF, much less edit one.

  • Why are forms with calculations so slow?

    I am using a form with a number of dynamic fields. After entering a value, it takes over 30s to update and allow me to enter the next value. This delay is present even when filling in fields that are used in calculations.
    The delay is present even when filling fields that are NOT used in calculations.
    Message was edited by: tdlittle.gm

    Christopher,
    I will agree with other posters that, in the absence of any need to make "cross-platform" transfers, it would be better to format the drives as HFS+ (Mac OS Extended) before you use them.
    I don't think, however, that this will have any effect on transfer speeds (it might, but I don't think so). If you purchased these drives as USB2 devices, then they undoubtedly use a USB2 interface. The drive itself, however, might deliver slower performance. In other words, the "bottleneck" wouldn't be the bus speed, but the drive's ability to record data. This would be similar to the difference between 5400 RPM and 7200 RPM drives, both connected to the same bus. A faster drive will deliver faster speeds over that same bus, and the Key drive you have might be very slow.
    It might be a case of getting what you pay for. Were these relatively inexpensive drives? Perhaps a more expensive, well-known brand name drive would perform better.
    Scott

  • Best Solution for Creating an Onlne Purchase order form with multiple calculation fields

    I am a bit confused.  Our school has a Forms Central account which works great for our registration forms but I need to find a solution for creating an online purchase form with multiple calculation fields - I know that forms central does not support calculation fields (too bad) but I know that Acrobat Pro does... soooo...
    Can you create the forms in Acrobat and then somehow integrate the advanced features into forms central?  Do they talk to each other?  Is this easy to do? .... I guess another way to putting it is can you create the forms in Acrobat including all of the advanced features for payment calculation and then host it online using Forms Central to manage and collect the data? (I guess that really is my question)
    Thanks (how does this compare to a solution like Formstack?)

    Hi, thanks.
    The naming convention was the consistant up until a point when I read that you need a '.' syntax (?!) - does anyone know if this is true?
    Attached is a version with Bernd Alheit's suggestion and with all the naming of the fields being consistant. It's still not working for me though after doing this and I'm stuck as to why, because I think it should work. I've also tried writing the calcualting line of code in the same manner that Bernd Alheit suggests before I came on here, and it wouldn't work then.
    As with any coding, it must be something to which I have done, but I can't see it anywhere
    Any ideas? Thanks for helping me
    Cheers

  • Work with calculation forms on ipad?

    Hello,
    is it possible to work on the cases with calculation forms as http://individuelle-mitgliedschaft.aktivtreff.de/templates/injoy/images/vitalis. pdf
    The form was created with Adobe Lifecycle designer. With Acrobat Reader, I can open it, but the calculation will not work. On the Mac, it works just fine. Does anyone have any idea?

    hello yes there is a back that fits and locks the smart cover aswell check out the Incipio Smart Feather back for the new ipad .There is also some good reviews of one on youtube 

  • I have been looking everywhere on how to code a contact form with as3

    I wouldn't think it is such an uncommon thing, but I have been unable to find tutorials past flash 5, or as2, on how to code contact forms.
    I have a simple movieclip symbol, with text fields, all with instance names, and need to find out how to pass the information from flash to a php
    script.  If anyone can help, or atleast point me towards a tutorial that uses something newer than flash 5 and newer than 2004, it would be awesome.

    Would any of these work?
    http://www.webdesignmo.com/blog/2008/08/14/flash-contact-form-in-actionscript-3/
    check this one first:
    http://www.kirupa.com/forum/showthread.php?t=272898
    http://www.edesignerz.net/flash/527--flash-cs3-as3-contact-form-with-php-parser-actionscri pt-3-video-tutorial
    Hope this helps!

  • Basic form with external data

    I am not sure if I am overcomplicating something I am trying to do with designer/Acrobat.
    I am trying to create an interactive work order.
    Much of the basic layout has been done, and most of the fields are doing what I want them to do, though I still have a little here and there that needs some tweaking.  But before I get to doing those, my primary focus is to have the form access external data.
    For example.  I have a table in the form that has the following fields.
    Quantity     Part Number     Description     Price     Amount
    Quantity, price and amount are all internal to the form itself, and are fillable by the user of the form, with the exception that the amount field is a calculated value based on the previous two.  My intention is that these fields are only filled by the user of the form when needed.
    My issue however is the Part Number and Description fields, which has me quite perplexed on what would be the best way to go.
    From some of what I have read here and there in this forum and elsewhere, it seems that I have to have some kind of complex setup regarding sql servers if I want to use a simple database file (access for example) where I can edit as needed on the fly to pull data into the form as needed, using for example, a pulldown, to populate the two fields.
    I can muddle through that for my personal needs, however, my intention is to provide the form to co-workers so they can use it without having to set up what I am seeing as extremely complex setup of installing and configuring sql servers and so forth.  The computers will not be connected to any networks, these are field laptops.
    What I was hoping was to provide the database with the pdf file and let the end user simply copy those to a folder and use them without much fuss, aside from them being able to edit the database file to add their own custom information.  I was also considering adding in the ability for them to save and recall customer contact information as well.
    I am not by any stretch of the imagination a programmer.  I am a technician.  I can figure out how to use access easily enough.  But beyond this...well...its all greek to me if you get my gist.
    Am I overcomplicating the matter.  Is there an easier approach to what I want to do?  Are there any complete samples  (includes all the files needed) available that I can use and study to accomplish what I am trying to do?
    Appreciate any input from you folks here.
    Thanks.

    Hi,
    There are (at least) two ways of approaching this.
    One is to have the Part No. and Description in an external source (eg database) and then set up a data connection in the form to access this information. One problem is that if the user are using Adobe Reader, then the data connections will not work. See summary of deployment options here: https://acrobat.com/#d=3lGJZAZuOmk8h86HCWyJKg
    Another option is to hard wire the Part No and Description into the form. There is an example here and links to a tutorial on Acrobat Users website. Linking Drop Down Fields / Combo Boxes
    Good luck,
    Niall

  • Companies or Individuals who will create html5 forms with ES4 ?

    I work for a business who has many forms that we would like changed from PDF or word document to a dynamic Fillable PDF form with Livecycle ES4 - expandable rows, basic calculations, that sort of thing.   Nothing too advanced I don't think but still beyond me.   Livecycle is not my area of expertise and i thought instead of spending hours upon hours trying to learn the software perhaps there are people out there for a good price who would do it for us.  We need these forms to be compatible with computers as well as mobile devices.  
    Do any of you happen to know of any companies or people who would be capable, trustworthy and reliable for this?  I am located in Canada (Hamilton,ON) so would prefer companies in our country but not a dealbreaker.
    Thanks,
    Dave

    Yes... change corrupted user and group "10490/25" to e.g. root/users ...
    1) chown root.users /opt/Adobe -R
    2) if You need... add yourself to users group also
    regards

  • Use Formule on FORM with REPORT - result stored at table

    Hi all,
    What is the best solution for?
    I have region with FORM WITH REPORT on the same PAGE.
    Values stored at table INFO with column ID, MYDATE, TIME_START_HOUR, TIME_START_MIN, TIME_END_HOUR, TIME_END_MIN, SUM1, SUM2
    ITEMS on the form:
    P1_ID (hidden)
    P1_MYDATE (date picker)
    P1_TIME_START_HOUR (select list)
    P1_TIME_START_MIN (select list)
    P1_TIME_END_HOUR (select list)
    P1_TIME_END_MIN (select list)
    P1_SUM1 (hidden)
    P1_SUM2 (hidden)
    After user fill in MYDATE, TIME_START_HOUR, TIME_START_MIN, TIME_END_HOUR, TIME_END_MIN then I need proces for calculation SUM1 en SUM2. Result stored (one record) at table INFO.
    Report shows all columns. User had possibility to update the record
    Formule:
    Select
    (CASE
    when to_char(mydate,'DY','nls_date_language=dutch') in ('ZA','ZO')
    THEN substr(to_timestamp (mydate||':'||TIME_END_HOUR||':'||TIME_END_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    to_timestamp (mydate||':'||TIME_START_HOUR||':'||TIME_START_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    (interval '00 00:00:00' day to second)
    ,12,5)
    ELSE '08:00'
    END) SUM1,
    (CASE
    when to_char(mydate,'DY','nls_date_language=dutch') in ('ZA','ZO')
    THEN substr(to_timestamp (mydate||':'||TIME_END_HOUR||':'||TIME_END_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    to_timestamp (mydate||':'||TIME_START_HOUR||':'||TIME_START_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    (interval '00 04:00:00' day to second)
    ,12,5)
    ELSE '04:00'
    END) SUM2
    FROM INFO
    where id=:ID
    What is the best way for the calculation: computation or processes or etc? The calculation after or before user push button(New:create button of Update:Apply Changes)?
    How to fill the answer (SUM1 and SUM2) at table INFO?
    Thanks Walter

    I have something similar I use:
    DECLARE
      str_day      VARCHAR2(10);
      dt_indx      DATE;
      db_dt_indx   VARCHAR2(20);
      str_st_tm    VARCHAR2(20);
      dt_st_tm     DATE;
      db_st_tm     VARCHAR2(20);
      str_ed_tm    VARCHAR2(20);
      dt_ed_tm     DATE;
      db_ed_tm     VARCHAR2(20);
      shft_flag    NUMBER;
    BEGIN
      str_day    := :P1050_DATE_MM || '/' || :P1050_DATE_DD || '/' ||  :P1050_DATE_YYYY;
      dt_indx    := to_date(str_day, 'MM/DD/YYYY');
      db_dt_indx := to_char(dt_indx, 'MM/DD/YYYY');
      str_st_tm  := str_day || ' ' || :P1050_TIME_IN_HH || ':' || :P1050_TIME_IN_MI || ' ' || :P1050_TIME_IN_AM;
      dt_st_tm   := TO_DATE(str_st_tm, 'MM/DD/YYYY HH:MI AM');
      str_ed_tm  := str_day || ' ' || :P1050_TIME_OUT_HH || ':' || :P1050_TIME_OUT_MI || ' ' || :P1050_TIME_OUT_AM;
      dt_ed_tm   := TO_DATE(str_ed_tm, 'MM/DD/YYYY HH:MI AM');
      --Alter date if night shift
      SELECT NVL(:P1050_NIGHT_FLAG,0) into shft_flag from dual;
      IF dt_ed_tm < dt_st_tm THEN
        dt_ed_tm := dt_ed_tm + 1;
      END IF;
      db_st_tm   := to_char(dt_st_tm + shft_flag,'MM/DD/YYYY HH:MI AM');
      db_ed_tm   := to_char(dt_ed_tm + shft_flag,'MM/DD/YYYY HH:MI AM');
    end;You'll need to modify it for your page variables.

  • Erratic behavior with calculated fields

    A new issue,
    I am working on a form with a great many numeric input fields.
    These fields are used in a series of calculations
    Item one - The first calcualted field sub-totals a column of numbers
    Item two - The second calculated field subtracts a column of numbers from that sub-total
    Item 3 - The third calcualted field is the totals four columns like the one listed above.
    Item 4 - The last calculation is the total above divided by four.
    A simple calculation is uses to enter this total at the start of the next page and so forth throughout the form.
    The problem is that sometimes as I add figures to item one, the number does not always update in item four right away. I kind of have to jimmy with the entries a little. Itis like the totals column lags behind by one entry.
    I also get a number of issues when going backwards and removing entries.
    Any thoughts on what I am doing wrong?
    Steve

    Thanks much...this occured to me as well after I posted this...felt kind of dumb actually. But that was indeed the correct
    solution.
    Thanks much.
    Steve

  • Don't want to assign Admin role to form with business rule

    Hello,
    I have a business rule assigned to a form in EPMA mode. Currently, I have to assign Admin role to the users in order for them to see the name of rule display on the left side of the panel when the form is opened. How can I have the name of rule display for users without having to assign them as Admin role in EPMA mode?
    FYI .. This same form with attached rule was displaying just fine for these users as I assigned them as regular user (not admin role) under a specific user group folder for Classic mode. These users can change data, click save button, and then the rule would run on save.
    Thank you so much for sharing.

    John .. Thank you so much for your previous reply.
    Here is additional information. I hope it provides a clearer understanding on this issue.
    1) To answer your question - Yes, I used Calc Manager to create the business rule named xyz.
    2) The Shared Services version that I used to provision a test user is 11.1.1.3.24.
    3) Here are the steps that I did for testing:
    step a) in Shared Services - I created a test user named: cashtest (Native status)
    step b) in Shared Services - I provisioned user "cashtest" with the following roles for these categories
    Business Rules -> Server 123 -> Interactive User
    Essbase: Server abc:1 -> Server Access
    Foundation -> Shared Services -> Calculation Manager Administrator -> Planning Calculation Manager Administrator
    Planning -> Forecast -> Administrator
    As you can see under the Planning category for application "Forecast", I had to provision for user "cashtest" as "Administrator" in order
    for user "cashtest" to see the business rule named "xyz" displayed on the left panel when a form was opened.
    Prior to this "administrator" provisioning, I tried to provision the roles of "interactive user or Planner" to user "cashtest" but the business
    rule would not display on the left panel when a form was opened.
    I wonder if this is a software bug.
    Thank so much again for your guidance.
    Edited by: CubeQuestion on May 12, 2010 4:09 PM

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have created a .pdf form with text boxes, but the recipients are unable to fill in their answers.

    How can I distribute a form with text boxes so that the recipients are able to type into the boxes?

    This forum is for the Adobe FormsCentral (formscentral.adobe.com) which is a service that allows you to create, collect and analyze data using an online web form. You should ask PDF related form questions in the Acrobat forums: http://forums.adobe.com/community/acrobat/forms
    I'll move your post to that forum so you don't need to retype it. They can help you out...
    Randy

  • I have created a PDF form with field but for some reason I cant type in them

    I have created a PDF form with field but for some reason I cant type in them

    May be that the text fields are read-only.

  • I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. How can I fix this?

    I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?

    I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.

Maybe you are looking for

  • Invoking Stored Procedure with OUT Parameter

    I am calling a stored procedure that has a "out" parameter of PL/SQL type (table of varchar2) through toplink API. My procedure executes, performs the updates successfully, but I can not obtain the value of the out parameter. Is the approach followed

  • TimeMachine no longer backups. No error message just seems to stall. Any ideas?

    Hi, Up to 4 days ago Timemachine was working flawlessly. Now my macbook pro will start a backup and them seemingly just stall. No errors given. The same is true for a manual or automatic backup. I haven't installed anything new on the system so I'm a

  • Auto populate filename only

    Hello, To start off, I am a very low level beginner wtih JavaScript.  I understand what it is and can do, but I have no clue how to write it, and I have not been able to learn yet. Can someone please help me find/write a script that can be set as an

  • Behaviour of to_char function in sqlplus versions 8.1.6.0.0 and 9.0.1.3.0 .

    Behavior of to_char function in sqlplus versions 8.1.6.0.0 and 9.0.1.3.0: Hello, We are migrating our apps between different environments and we observed the following behaviour: When using the command select to_char(sysdate,'D') from dual, this give

  • Class-Map and Policy-Map Configuration in CM Confusion

    Hi, I'm implementing a green field WAAS deployment for a customer. We currently have a Proof-of-Concept up and running. I've got some questions regarding custom class-map and policy-map configuration in the CM. I'd like to nail-down the custom class-