How and can I insert a Excell like form

Support for Fusion 11
Confusion 11
Posts: 27
Joined: Thu Feb 25, 2010 4:34 pm

How and can I insert a Excell like form

Postby Confusion 11 » Sat Mar 06, 2010 5:31 am

What is the best way to insert an excell like table into fusion so that visitors could plug in their numbers in a table and see the answer based on my formula.?

User avatar
admin
Site Admin
Posts: 1303
Joined: Mon Oct 24, 2005 2:07 am
Location: Stuart, FL
Contact:

Re: How and can I insert a Excell like form

Postby admin » Sat Mar 06, 2010 7:25 am

What is the best way to insert an excell like table into fusion so that visitors could plug in their numbers in a table and see the answer based on my formula.?
Depends on how complex you need it to be.

JavaScript can be used to do calculations.

Have an example of what you want to do?

Chuck

Confusion 11
Posts: 27
Joined: Thu Feb 25, 2010 4:34 pm

Re: How and can I insert a Excell like form

Postby Confusion 11 » Sat Mar 06, 2010 7:40 am

1. super simple ( 240/8=30) where the visitor inputs 240 into one cell and 8 into another and then the answer 30 shows up.

2. More complicated
see this link http://www.2mcctv.com/hdcalculator.html

User avatar
admin
Site Admin
Posts: 1303
Joined: Mon Oct 24, 2005 2:07 am
Location: Stuart, FL
Contact:

Re: How and can I insert a Excell like form

Postby admin » Sat Mar 06, 2010 9:20 am

1. super simple ( 240/8=30) where the visitor inputs 240 into one cell and 8 into another and then the answer 30 shows up.

2. More complicated
see this link http://www.2mcctv.com/hdcalculator.html
2. Uses JavaScript and arrays. Yes, it's complex. Not complicated, but complex.

1. Easy to do as follows (you can change the form name and field names to suit, but just follow the directions initially):

a. Place a table on your page with a single row and four columns.
b. Go to the Table properties and check the "Is a form" checkbox.
c. Name the form "EntryForm"
d. In the first cell, place a Forms Edit Field and name the field "First". Make the Char Width 6 for now. after the field, type in a "/" (to indicate division).
e. Copy and paste the edit field from the first cell into cells 2 and 4.
f. Rename the field in cell 2 as "Second". Rename the field in cell 4 as "Total".
g. In cell 3, place your cursor in the cell and press Ctrl+t.
h. Enter the following code into the Insert HTML window.

Code: Select all

<input type="button" name="calculate" value=" = " onClick="EntryForm.Total.value=eval(EntryForm.First.value / EntryForm.Second.value)">
i. Now do a local publish (or just go to Page Preview) to test.

Enter numbers in cells 1 and 2 and then press the = button and the result will appear in cell 4.

If you want to do away with cell 3 (and the = button), you can enter the following code in the HTML of the edit field in cell 2 instead:

Code: Select all

onChange="EntryForm.Total.value=eval(EntryForm.First.value / EntryForm.Second.value)"
Chuck

Confusion 11
Posts: 27
Joined: Thu Feb 25, 2010 4:34 pm

Re: How and can I insert a Excell like form

Postby Confusion 11 » Sat Mar 06, 2010 9:40 pm

Thank you Chuck!! I Can be taught! :D


Return to “Fusion 11”

Who is online

Users browsing this forum: No registered users and 1 guest

cron