PDA

View Full Version : Form Help Required



Aliens Anonymous
07-25-2007, 06:27 PM
Building forms in bv is easy html and php but i have come across a problem. i have a script that does what i want but i wish to do the same thing using the form elements in bv, problem is i can't get it the work in bv the script is java. does anyone know what i would have to do to be able to use the bv editboxs. the demo from is here the part i want to incorperate into the forms the two boxs to the right ( which are out side the form grid ) In Dollers $ .
Thanks for any help.
ps: i have tried do the events but not sure if there right.
http://angies-cyberscripts.org/test_forms/orderform.php

Andy128
07-25-2007, 07:34 PM
I see the demo (In Dollers). Now- which elements are you trying to have do the same thing in your form? Item Name? Amount in $? Not quite clear on what you are asking.

Andy

Aliens Anonymous
07-25-2007, 07:38 PM
the two boxs on the right, if you choose from the dropdown the amount is filled in the box below, i wish to do that with bv boxs

Andy128
07-25-2007, 08:25 PM
Having taken a look- I do not believe it is possible. The reason is that there is not a "fill text" option on the events of the drop down property menu. I believe VH would have to add that function in to the form element properties. However- you could build a form using a table and then place it in a html box. This would certainly allow you to customize the form.

The other option would be to build the page. Import it back to your computer and open in notepad and add that event and then FTP the page back to the server.


Andy

navaldesign
07-25-2007, 08:41 PM
Quite possible using BV forms and Javascript. It is simply a dependent dropdowns system: have a look at http://www.dbtechnosystems.com/dependent_drop_downs.php

If you wish, i will email you the necessary steps.

In the example, i have only provided 3rd level values for SALES (1st in the first dropdown) the other two only have second level choices.

If, instead you need online, realtime calculations, have a look at http://www.dbtechnosystems.com/formaexcel1.html

I found the original script in javascript.internet.com by Vladimir Geshanov and i modified it from two levels to three levels. Another version i use retrieves the array values (and consequently, the values of the dropdowns) directly from the database combining Javascript with php/MySQL and autocreates the arrays based on the number of values found in the database table..

Aliens Anonymous
07-25-2007, 09:44 PM
Quite possible using BV forms and Javascript. It is simply a dependent dropdowns system: have a look at http://www.dbtechnosystems.com/dependent_drop_downs.php

If you wish, i will email you the necessary steps.

In the example, i have only provided 3rd level values for SALES (1st in the first dropdown) the other two only have second level choices.

If, instead you need online, realtime calculations, have a look at http://www.dbtechnosystems.com/formaexcel1.html

I found the original script in javascript.internet.com by Vladimir Geshanov and i modified it from two levels to three levels. Another version i use retrieves the array values (and consequently, the values of the dropdowns) directly from the database combining Javascript with php/MySQL and autocreates the arrays based on the number of values found in the database table..


Thanks Naval but what i won't to do is the same as the first "post" ( two boxs on right ) but using the blue voda web builder tools, not html . i can set the event to onChange action i set to javascript function then in the new box that appears i typed fillText() but it won't work not sure if the values should be in the dropdown.
This is the script for the two box's ( i do not want to build the form in dreamweaver this is why i was wondering if i could get bv to do it.)



<Script Language="JavaScript">
function fillText()
{
document.testForm.DetailText.value=document.testFo rm.OperationDropDown.value;
}
</Script>
<body>
<form name="testForm" id="testForm" action="">
Make Selection<br><br>
<select name="OperationDropDown" onChange="fillText()">
<option value="" selected="true">Select an operation</option>
<option value="300">Membership</option>
<option value="400">Registration</option>
<option value="50">Something else</option>
</select><br>
<input type="text" name="DetailText" id="DetailText" size="10">
</form>

navaldesign
07-25-2007, 09:50 PM
I'm not sure i understand. You can use BV form fields, and simply add the javascript. Why do you need to have onChange? if you need, anyway, Javascript ?

Aliens Anonymous
07-25-2007, 10:03 PM
On this page http://angies-cyberscripts.org/test_forms/orderform.php i have two box's on the far right the top one controls what appears in the bottom one. that is a html box with the code inside, i can't put it on the form (which is built using bv web builder ) won't work, have tried editing the bv dropdown and text box's to do the same thing but i am not getting it right. the script uses the onChange but i think the action comand is fillText() i just can't seem to get the same effect.

navaldesign
07-25-2007, 10:19 PM
Ok, this is the solution:

1. Your form MUST be named "testForm" or the script has to be modified.

2. The following MUST be pasted in the Between head Tag:

<Script Language="JavaScript">
function fillText()
{
document.testForm.DetailText.value=document.testFo rm.OperationDropDown.value;
}
</Script>

3. The fdropdown MUST be named "OperationDropDown"
4. The text field MUST be named "DetailText"
5. Right click on the dropdown field, select HTML and paste this in the INSIDE TAG of the field html:

onChange="fillText()"


That's all. See it in action in: http://www.dbtechnosystems.com/Tips/autofilled.html

Of course, you can change the form and fields names as you like, but you will need to change them accordingly in the script

Andy128
07-25-2007, 10:44 PM
Naval- THE KING OF CODE!

navaldesign
07-25-2007, 10:45 PM
Simply looking at the code Andy,.......

Aliens Anonymous
07-25-2007, 10:53 PM
Thanks Naval your a god send, out of all the attempts the only thing i fell down on was the onChange="fillText()" everything else i got right we theres no stopping me now. http://angies-cyberscripts.org/test_forms/Navaltest.html

navaldesign
07-25-2007, 10:55 PM
http://www.vodahost.com/vodatalk/images/icons/icon10.gif Thanks a lot !!!! http://www.vodahost.com/vodatalk/images/icons/icon10.gif