Calculate fields

i am making a contract with fields in DW CS3,    how do i make fields calculate?
example:
I wish to purchase_____________gallons of heating oil at the fixed price of $_____________per gallon for a total cost of $ __________
where the total cost of "$"  is automatically calculated from fields "purchase" and the "price"
thanks
Lisa

With an HTML form and a little javascript code.  Paste the following code between your <body> and </body> tags.
<form>
Gallons of heating oil:<br />
<input type="text" id="field1"><br />
Price per gallon:<br />
<input type="text" id="field2" value="3.00" >
<br>
Total $ price:<br />
<input type="text" id="ans" onfocus="document.getElementById('ans').value=document.getElementById('field1').value*document.getElementById('field2').value" >
</form>
This is how it will look
Gallons of heating oil:
Price per gallon:
Total $ price:
Does this help?
Nancy O.
Alt-Web Design & Publishing
Web | Graphics |  Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb

Similar Messages

  • Calculate fields do not work

    I am fairly new to working with Adobe Acrobat 9 Pro, JAVA Scripts, and PDF files. So this may sound as a newby question. I have a PDF that has tons of fields that are filled in under program control from a database. When the PDF is rendered to my MVC View, the PDF comes up and the the fields display the correct values but the fields that hold the Total Values are all Zero (0). These calculate fields I went into Properties, Calculate Tab, and then set the Value Set Is to (Sum +), then picked the fields to be Summed. to test it, I set the default values of the fields to one (1) and the field I set to calculate the Sum shows the correct number. Then I Saved the PDF file and moved it to my MVC folder. When I run the program and tell it to render the PDF, the PDF is called up, values are filled in, and the PDF then displays on the screen. The filled in fields all have the correct values but the calculate fields display Zero (0).

    It could be related to the application you're using to display the files.
    It sounds like this is some sort of custom application, and not Adobe
    Reader or Acrobat. So it could be that this application doesn't support the
    JavaScripts that are embedded in the file.
    Another option could be that since you're populating the fields from a
    database, the calculation scripts are not triggered.
    To do that you could try embedding a piece of code in the document that
    will force it to refresh the calculations when it's opened.
    The code to use is:
    this.calculateNow();

  • Left click doesn't work in calculate fields

    We have a Windows 8.1 Pro system. We are using Adobe Acrobat 11.0.07. When editing a for in the calculate field we can Select all or Deselect All
    or we can select a field but have to hit the space bar to select the field. The Left mouse button doesn't work. Any ideas? We have can left click the field we want on any other OS just not Windows 8.1.

    Click a bit off center of the check-box on the left. It's a known bug in
    Acrobat.
    On Fri, Jul 18, 2014 at 7:05 PM, tricalmark <[email protected]>

  • Auto Calculate Fields

    Can you automatically calculate fields when you create a new form within Forms Central? If so, how?

    Hi,
    Sorry, this is not supported in FormsCentral
    However, you could add formula in the View Responses table for the responses that you collect:
    http://helpx.adobe.com/acrobat-com/formscentral/help/response-table.html
    http://helpx.adobe.com/acrobat-com/formscentral/help/formula-syntax-built-in-functions.htm l
    Thanks,
    Lucia

  • How to calculate fields in a form?

    Hello,
    I am new to apex and i have a question about create a simple calculation in a form.
    I created a form and i have 3 fields which i want to use for calculating.
    Field 1/ field 2 = field 3
    when the user enters data into the first and second field it will automatically calculate the third field.
    How can i do this?
    i am using
    Application Express 4.2.1.00.08

    The short answer is that it depends. I'm assuming you want the calculation to appear as soon as the second value is put in, and if this is the case then javascript is the answer. You can create a generic javascript function that does division and takes to input parameters and returns the result. Inside the function you would check to make sure the denominator isn't zero (an illegal operation), do the math and assign the calculated value to the return value of the function.
    The function code would look something like this:
    function div_values(numerator, denominator) {
    // pass page item names into the function
    // $v will get the value from the item name
    if ($v(denominator) != 0) {
    result = $v(numerator)/$v(denominator);
    return result;
    }Then you can call the function via a dynamic action by selecting a "Javascript Expression" for a Set Value operation (Advanced dynamic actions) and put this into the Javascript expression area:
    div_values(P1_NUMERATOR,P1_DENOMINATOR)
    The reason I recommend creating this little function as opposed to just doing the math in the javascript expression area is that the function becomes reusable and the page items aren't hard coded into the function. Then you can use the function wherever you want to on the page or, if you put it in a place where every page can get to it, you can use it anywhere in the app.
    Earl

  • Populating the "number format" and "calculate" field properties?

    I've been making a lot of Acrobat forms with an extremely large number of form fields (as in, over a hundred or more per form).
    Each field has to have these properties:
    -Set to Number format, with 4 decimal places specified
    -Set the Calculate property with a simplified field notation (field1*field2), to perform multiplication, or, it's set wtih the "value is the (product) of the following fields" function.
    Is there a way of copying these attributes to already pre-existing fields?  It appears that for already existing fields, if you want them all to have these same attributes, you have to set them one by one-- very tedious.  If you multi-select all fields at once, it doesn't let you set them all to the same calculation setting, and it doesn't even let you set them all to number format.
    So, up till now I've simply made one (or a few) fields, set them to these properties, and then populated them by duplicating the fields, but-- I still then have then to go in and re-name every single field, so that each is a unique field-- also very tedious.
    Is there some way that I don't know about, that would allow me to set these properties to multiple pre-existing fields at the same time?

    Unfortunately, no.
    However, you can set the the field's calculation formula using a simple script.
    Let's say your fields are called field1, field2, field3, etc. You can then run this code from the console:
    maxFields = 100; // let's say you have 100 fields
    for (i=1; i<=maxFields; i++) {
         f = this.getField("field"+i);
         if (f) f.setAction("Calculate", "event.value = this.getField('x').value * this.getField('y').value;");
    Of course, you can adjust the formula to your own needs.
    Make sure you use single quotes inside of the script when you want to specify a literal string.

  • Need help using drop down list to calculate fields

    I am trying to use a drop down list to control how my field calculate. I have events packages that have multiple tiers. For example, Package One has (2) Tiers. Tier 1 costs $16 & Tier 2 costs $20. So based on the number of guests i want to be able to select the tier and it multiply and give me the total cost for the package. Ex: 2 Guests for Tier 1 = $32. Here is the code i have so far, it is placed under the change handler of the drop down list:
    var costPerGuest = 16;
    var tier = event.newText;
    if (tier == "Tier 1"){
      costPerGuest = 16;}
    else if (tier == "Tier 2"){
      costPerGuest = 20;}
    Total.rawValue = String(Guests.rawValue * costPerGuest)
    //Total.rawValue = DropDownList1.rawValue;
    What happens is when I run this it will not change unless the number of guests will change. So for the example above, if i switch it to Tier 2 after selecting Tier 1, it will not change my Total from $32 to $40.
    Any help would be greatly appreciated.

    Hi,
    I think ,you can use the event of EXIT event of dropdown list.
    var costPerGuest = 0;
    if (this.rawValue == "Tier1")
      costPerGuest = 16;
    else if (this.rawValue == "Tier2")
      costPerGuest = 20;
    else
    total.rawValue = Guests.rawValue * costPerGuest;
    Hope this helps,
    S,Candy.

  • Drill Across fields mapping with calculate field

    I create a calculation field in one view, then when config drill across, i set the calculation field to mapping to a Parameter of target view
    Save report
    Then, i open the report in view mode, click the view which config drill across, it get JavaScript error in DrillAcrossModifierManager.js line 272, Object required

    Hi,
    I'm using BAM 11.1.1.4, and I have a report wich calls another report through DrillAcross.
    Both reports have no calculated fields and I am receiving the same error message:
    Mensagem: object required
    Linha: 273
    Caractere: 5
    Código: 0
    URI: http://server:9001/OracleBAM/13846/reportserver/scripts/drilling/drillacross/DrillAcrossModifierManager.js
    Any idea about the cause of this error?
    Thanks.
    Luciano Gomes

  • Show calculate field blank on a fillable form

    Hi
    I have created a form with a sum calculation. Does anyone know how to show the total blank before the form is filled in. At the moment the total shows 00.00
    This needed so people have the alternative to print it out blank and fill it in by hand.
    I'd be glad for any help.
    Thanks
    Mags

    Note that for the script to be triggered, that the calculated value of the field that it's attached to has to change. So change one of the dependent fields and then change it back so that the calculated result is zero.
    In this case, it looks like a calculated result of zero might be valid. If this is the case, it would be better to use a custom calculation script and only set the calculated result to blank if all of the input fields are blank, and removed the validation script. Post again if you'd need help with this.

  • Calculate  field with netprice and quantity.

    Hello,
    I'm facing a problem making a calculation of 2 fields : there's a quantity (type vbap-kwmeng) and I want to multiply it with a value of type vbap-netpr.
    Problem is that he uses the decimal seperator not as a decimal seperator.
    E.g. : 10.000 * 1.000 gives not 10.000 but 10.000.000. The only solution found is changing the arithmic operator of the program, but that's not an option, since it is coded in a user exit..
    Someone out there who can help ?

    Hi,
    the output you are getting is correct to my knowledge as in german language the numbers are separated denoted by '.' instead of ',' and for decimal they denote ',' instead of '.'
    thats why you get the values in this way.
    otherwise....
    check if this code works....
    just before the calculation write the code given below
    set country 'IN'.
    I think this will work out.
    Regards,
    Siddarth

  • Calculate field data

    I wish to create a form with 3 fields named RE, OP and SUP. Fields RE and OP will allow a user to enter number values of their choice. Field SUP is read-only and will output a calculated value based on a call to function named GET_REJECT that takes 2 parameters (in this case it will be RE and OP).
    Questions:
    1. How do I set up the form with these 3 fields?
    2. How do I call the function within the SUP field?
    Thanks,
    Ric

    Hi Ric,
    It would depend on what the calculation is.
    If it's a simple RE + OP, then I'd suggest javascript. If it's more complicated than that, you could use Ajax.
    Andy

  • Unable to select fields in Acrobat XI Pro forms tools/editor to calculate

    First, in Acrobat XI Pro forms editor when attempting to calculate fields, I am unable to select the fields (click) to calculate.  I can only select all or deselect all.
    Also, if my simple spreadsheet formula is:
    =IF(Value01>0,SUM(Value01*(Value02-Value03)),"")
    Is there a straight forward way to translate that formula into a functioning calculating script in Adobe Acrobat XI Pro Forms tools (or FormsCentral)?
    Thanks for any input.

    Regarding the calculation, it can be done with a script. This is a good place to start learning about such scripts in Acrobat:
    https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

  • Why don't all of my fields calculate properly?

    I've created a form in Acrobat XI with multiple calculate fields.  They all work properly until I save the document and distribute it.  Once that happens, the fields start acting, well, funny.  Not all fields will calculate.  Sometimes it misses one or two, sometimes more.  If I space through all of the empty fields, sometimes that fixes it - but asking the end user to space through all the fields is not something we want to do.  How do I fix this?

    You you should check that the field calculation order is set correctly, in the order that makes sense for your form. Note that this is not the same as the tab order. Exactly how you go about setting it depends on what version of Acrobat you have.

  • How  to expand rows in a table by calculated value of a field

    Hi,
    I'm trying to set the rows of an expandable table to follow the calculated value of a field.
    The calculated field comes from two date fields that calculate the number of days and I want my table/row to expand based on that number..
    Is is possible? Right now I have a button that does add an instance  "Admin_Use.Table3._Row1.addInstance(1);" but I want it to be triggered by the calculated field instead...
    Thank you so much!!!!

    Hi Niall,
    Thank you for your reply. I'm still a bit puzzled as right now I have this code in my calculate field (see below) under the calculated event and I'm not sure how to insert the code you sent me as I keep getting syntax errors. Any help will be greatly appreciated!!!
    if (HasValue(Nights.FirstNight) & HasValue(Nights.LastNight) ) then
        if (Date2Num(Nights.LastNight, "YYYY-MM-DD", "en_IE") >= Date2Num(Nights.FirstNight, "YYYY-MM-DD", "en_IE")) then
            $ = Date2Num(Nights.LastNight, "YYYY-MM-DD", "en_IE") - Date2Num(Nights.FirstNight, "YYYY-MM-DD", "en_IE") + 1
    else
            xfa.host.messageBox ("The first night cannot be after the last night", "Nights Covered", 0)
            Nights.LastNight.rawValue = null
    endif
    else
    endif

  • How can I get the sum of fields in group

    example:
    fieldA fieldB
    2 30 group1
    2 10
    5 12 group2
    5 14
    5 9 group3
    8 1
    8 9
    the values of fieldA in a group are the same.
    each group i want to calculate fieldA only once: 258
    how can i do this and display the sum at the first page of the report?

    Please re-post if this is still an issue to the Business Objects Integration Kits - SAP Forum or purchase a case and have a dedicated support engineer work with you directly

Maybe you are looking for

  • Queue propagation error---ORA-23603

    Hi Experts, I got lots of error as ORA-23603: STREAMS enqueue aborted due to low SGA for Destination "STRMADMIN"."STREAMS_APPLY"@sale2.net. However, destination SGA taeget and Max as 2552M. and source target/Max SGA is 1888M. In source database EM, I

  • Insert a pdf in a app

    Hi, We want insert a pdf in a app. We have a inhouse developper apple. We try to import htmlresources.zip in folio producer. When we creeat the app, we have a blank page. We see the forum about pdf but nothing is right for us. Do you know a solution?

  • ADF Master Detail Insertion and updation

    Dear All I am developing a web application with the ADF using ADF BC4J as a buisness service and JSP as th view. I am creating a Master detail page that makes the user add the ,master and the detail(s) information in the same page. Example: you may i

  • How to put a SQL Agent Job wait in the trigger while the job is running.

    Hello! I am not a geek in writing t-sql code so I am seeking forum help in completion of my task. I have a trigger which fires upon a action and with in that code, I am starting a job via t-sql like EXEC msdb.dbo.sp_start_job N'JobName'; Now, I want

  • BAPI_MDPROVIDER_GET_HIERARCHIES returns incomplete information

    Has anyone encountered this issue ? BAPI_MDPROVIDER_GET_HIERARCHIES returns incomplete information for field HRY_NAM. According to SAP documentation HRY_NAM field of HIERARCHIES table should contain hierarchy name uniquely identified with name, versi