[Pro] Adanced form

I need to create an advanced capture form for a property investor that calcultes a percentage of the figure that the user enters. So, for example the user enters 100,000 and clicks submit, they are then returned to a page where a sum has worked out (For example) 50% of the entered figure.

It sounds really complicated to me and I’m looking for an easy solution (if possible)


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 22/1/10 (at 03:17 -0500) lfcredbird7 said:

I need to create an advanced capture form for a property investor
that calcultes a percentage of the figure that the user enters. So,
for example the user enters 100,000 and clicks submit, they are then
returned to a page where a sum has worked out (For example) 50% of
the entered figure.

This is exactly the sort of thing that PHP is really good at. In a
nutshell, you’d have a simple form that submitted the number the user
types. This would point to a page that includes some PHP code. This
takes the submitted data, performs the math (which really is simple),
then slips the answer into the right spot in its (otherwise regular)
HTML layout structure.

The destination page will be named .php rather than .html to let the
web server know to look inside and process any instructions before
sending it on to the visitor.

This could also be done in one page, where the form submits to the
same page. That way you can have the same form available along with
the answer. This makes it simpler for the user to try out different
values without going back and forth.

Alternatively, this is something that can be done using JavaScript.
Again, for someone used to it, this would be relatively simple.

To write either solution yourself would still require a bit of
learning. But from your description it does sound to me like classic
“intro to PHP” stuff; simple, self-contained, and all about the
basics.

If you want to give it a try then head over to the Dynamo forum and
ask there. That’s where this sort of discussion is usually held.

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you are interested in the javascript path I have uploaded a couple
of pages I pulled from a property site I did for someone a while back,
these are done in javascript and so the calculations are made without
having to submit to a server side script in PHP or otherwise.

Here is a link to the first, I stuck a couple of links on this page to
the other pages.
http://easibase.com/javascriptsample/

If you like I can send you the sample file in Freeway, it is not
overly complicated but beware if you have no coding experience it
might be a little daunting :slight_smile:

HTH

On Jan 23, 2010, at 1:36 PM, Keith Martin wrote:

Sometime around 22/1/10 (at 03:17 -0500) lfcredbird7 said:

I need to create an advanced capture form for a property investor
that calcultes a percentage of the figure that the user enters. So,
for example the user enters 100,000 and clicks submit, they are
then returned to a page where a sum has worked out (For example)
50% of the entered figure.

This is exactly the sort of thing that PHP is really good at. In a
nutshell, you’d have a simple form that submitted the number the
user types. This would point to a page that includes some PHP code.
This takes the submitted data, performs the math (which really is
simple), then slips the answer into the right spot in its (otherwise
regular) HTML layout structure.

The destination page will be named .php rather than .html to let the
web server know to look inside and process any instructions before
sending it on to the visitor.

This could also be done in one page, where the form submits to the
same page. That way you can have the same form available along with
the answer. This makes it simpler for the user to try out different
values without going back and forth.

Alternatively, this is something that can be done using JavaScript.
Again, for someone used to it, this would be relatively simple.

To write either solution yourself would still require a bit of
learning. But from your description it does sound to me like classic
“intro to PHP” stuff; simple, self-contained, and all about the
basics.

If you want to give it a try then head over to the Dynamo forum and
ask there. That’s where this sort of discussion is usually held.

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oh BTW, the pages are php pages, this is only because I set the vat
rate in a config file although I edited that out and it is not just
set at the top of each page in php, this could be set in javascript
and not use .php but I am rushed today so I just did the vat rate
variable in php for speed as it was already there as such.

If this interests you I will spend 10 minutes on the pages and replace
the vat rate variable in javascript also so you can use .html for the
pages.

:slight_smile:

On Jan 23, 2010, at 5:21 PM, Mike B wrote:

If you are interested in the javascript path I have uploaded a
couple of pages I pulled from a property site I did for someone a
while back, these are done in javascript and so the calculations are
made without having to submit to a server side script in PHP or
otherwise.

Here is a link to the first, I stuck a couple of links on this page
to the other pages.
http://easibase.com/javascriptsample/

If you like I can send you the sample file in Freeway, it is not
overly complicated but beware if you have no coding experience it
might be a little daunting :slight_smile:

HTH

On Jan 23, 2010, at 1:36 PM, Keith Martin wrote:

Sometime around 22/1/10 (at 03:17 -0500) lfcredbird7 said:

I need to create an advanced capture form for a property investor
that calcultes a percentage of the figure that the user enters.
So, for example the user enters 100,000 and clicks submit, they
are then returned to a page where a sum has worked out (For
example) 50% of the entered figure.

This is exactly the sort of thing that PHP is really good at. In a
nutshell, you’d have a simple form that submitted the number the
user types. This would point to a page that includes some PHP code.
This takes the submitted data, performs the math (which really is
simple), then slips the answer into the right spot in its
(otherwise regular) HTML layout structure.

The destination page will be named .php rather than .html to let
the web server know to look inside and process any instructions
before sending it on to the visitor.

This could also be done in one page, where the form submits to the
same page. That way you can have the same form available along with
the answer. This makes it simpler for the user to try out different
values without going back and forth.

Alternatively, this is something that can be done using JavaScript.
Again, for someone used to it, this would be relatively simple.

To write either solution yourself would still require a bit of
learning. But from your description it does sound to me like
classic “intro to PHP” stuff; simple, self-contained, and all about
the basics.

If you want to give it a try then head over to the Dynamo forum and
ask there. That’s where this sort of discussion is usually held.

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Around 22/1/10 (at 03:17 -0500) lfcredbird7 said:

I need to create an advanced capture form for a property investor
that calcultes a percentage of the figure that the user enters. So,
for example the user enters 100,000 and clicks submit, they are then
returned to a page where a sum has worked out (For example) 50% of
the entered figure.

People have mentioned JavaScript and PHP solutions. Bear in mind that
in the JavaScript case the equation you’re using is visible by doing
a show source. It your equation is as simple as 50% that isn’t a
problem. They’ll soon work it out anyway. If it’s more complex, can’t
be worked out by using it, and you’d rather not give it away, then
you have to use the PHP route.

David


David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden
www.ivdcs.co.uk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

thanks for your responses.

it seems i need to learn some php this year (at some point). as i don’t have a lot of time with this particular form, would anybody be willing to help me to create this form? if there is a charge for doing this please let me know what it will be.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Jimmy,

You don’t need to learn php… there are various actions available for
handling the contact side of your form, PHP easiForm (Small payment)
and PHP Feedback Form (Free), either will handle your getting the
information to you.

As far as the math side of the selections are concearned… can you
break down exactly what you want to add or do math with?

e.g.

Menu 1

Option A - 10.00
Option B - 20.00

… plus selection from …

Menu 2

Option A - 10.00
Option B - 20.00

… is a total of …

Field total

Total amount

If this is straightforward as I think you need then there will be no
need to pay anyone.

Mike

On Jan 25, 2010, at 2:24 PM, jimmy b wrote:

thanks for your responses.

it seems i need to learn some php this year (at some point). as i
don’t have a lot of time with this particular form, would anybody be
willing to help me to create this form? if there is a charge for
doing this please let me know what it will be.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

hi Mike

thanks for your reply.

the idea is that a user can put a figure into the form and submit the figure for an quotation. the calculation would be worked out at 70% of the entered value which would be displayed to the user after submitting the figure. upon agreeing to the figure the user would be required to complete some further details to complete the process.

example: user enters £100,000 and clicks submit - the form calculates 70% of the entered amount (in this case £70k) - they are then required to complete some further items of the form to complete.

Can this be done with the actions?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Jimmy,

sorry, another busy day, it’s rushed and not tested very well but…

go to:
http://easibase.com/calc/

This is a working form set to your email address, try using it and you
should receive the email with the form contents.

is this what you want?

Mike

On Jan 25, 2010, at 3:30 PM, jimmy b wrote:

hi Mike

thanks for your reply.

the idea is that a user can put a figure into the form and submit
the figure for an quotation. the calculation would be worked out at
70% of the entered value which would be displayed to the user after
submitting the figure. upon agreeing to the figure the user would be
required to complete some further details to complete the process.

example: user enters £100,000 and clicks submit - the form
calculates 70% of the entered amount (in this case £70k) - they are
then required to complete some further items of the form to complete.

Can this be done with the actions?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

BTW, this is done without having to press Submit to get the 70% calc
but the calc side is done ‘as mentioned’ with javascript, so if
javascript is disabled it won’t work.

If this is along the lines of what you want I can send the FW file to
you.

Mike

On Jan 25, 2010, at 6:40 PM, Mike B wrote:

Jimmy,

sorry, another busy day, it’s rushed and not tested very well but…

go to:
http://easibase.com/calc/

This is a working form set to your email address, try using it and
you should receive the email with the form contents.

is this what you want?

Mike

On Jan 25, 2010, at 3:30 PM, jimmy b wrote:

hi Mike

thanks for your reply.

the idea is that a user can put a figure into the form and submit
the figure for an quotation. the calculation would be worked out at
70% of the entered value which would be displayed to the user after
submitting the figure. upon agreeing to the figure the user would
be required to complete some further details to complete the process.

example: user enters £100,000 and clicks submit - the form
calculates 70% of the entered amount (in this case £70k) - they
are then required to complete some further items of the form to
complete.

Can this be done with the actions?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

hi mike

this is very much along the lines of what I need. Does this use the easibase form actions as well as the javascript?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

In the example I have put up yes it uses the PHP easiForm actions…
but it doesn’t have to, you can use whatever you need to for handling
the contact email side of things. The reason I used easiForm is that I
wrote the actions and it literally takes me * several seconds * to add
them to a contact form… personally I do not like javascript but it
can be useful at times, javascript takes me a lot longer :slight_smile:

Why don’t you build your form as you want it to be and look, then give
me a shout when you have done that.

Mike

On Jan 25, 2010, at 10:44 PM, jimmy b wrote:

hi mike

this is very much along the lines of what I need. Does this use the
easibase form actions as well as the javascript?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

BTW, I have now changed the email address in the example so you don’t
get emails from others that might try it.

Mike

On Jan 25, 2010, at 10:44 PM, jimmy b wrote:

hi mike

this is very much along the lines of what I need. Does this use the
easibase form actions as well as the javascript?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

cheers for that! If you don’t mind sharing the FW file I would be very grateful. Does it lend itself to much changing - I will need to add some additional fields to that form but not touch the calculator fields? Is it just a case of uploading the file as well or are there any elements that need installing server side?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The javascript will need tweaking to clean it up so it works more
smoothly.

You can add other fields to the form and not affect the javascript
that has been used as long as you do not change the item names of
those two fields, you can adjust their appearance in the Form Element
Styler action without any worries.

If you use this with easiForm than you should add an instance of the
PHP easiForm Element action to those fields whose values you want sent
in the email, those fields and other elements should have a relative
name given to them in the inspector (a name without spaces and not
starting with a digit, if you want to use a space then use an under
slash… like ‘first_name’).

You do not have to use the easiForm actions, as I mentioned you can
use the PHP Feedback Form action but you should then remove the PHP
easiForm action from the page, the PHP easiform Element actions from
each form element it has been applied to and the PHP easiForm Errors
action at the top of the table… then add the PHP Feedback Form
action and set it up.

I have sent you the file I used but it may be simpler if you create
your form as you want it to be, then by that time I will have found
some time to clean the javascript up a bit for you, you can then use
the form handler action you feel you want to use with your form to
send the email.

HTH

Mike

On Jan 25, 2010, at 11:32 PM, jimmy b wrote:

cheers for that! If you don’t mind sharing the FW file I would be
very grateful. Does it lend itself to much changing - I will need to
add some additional fields to that form but not touch the calculator
fields? Is it just a case of uploading the file as well or are there
any elements that need installing server side?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options