Forums

how can i make a dynamic text area?

hilas 20 Sep, 2011
hello ! i need to do this

text area 1 | input by user
text area 2 | dynamic text area
text area 3 | dynamic text area2


in the page we well see this

text area 1 = 2 <--- input by user

text area 2 = 4 <---[ 2+(text area 1) ] the text box do automatic do the equation and show me the resuly (in this case its "4")

text area 3 = 40 <--- [text area 2 + 10 ] <--- the same of text area 2 but gettin the information of text area 2 and multiply by 10


The idea is to automation to confirm results before submitting the form, in which case the user just enter the number "2" in the first text box and the second box will automatically add 2, and the third will multiply 10 to second box .. and obviously shows me to confirm the data before pressing the submit botton


thank you very much
GreyHead 21 Sep, 2011
Hi hilas,

You can do this with a JavaScript code snippet in the Load JS action. It will be something like this:
window.addEvent('domready', function() {
  $('input_text_1').addEvent('change', function() {
    $('input_text_2') = $('input_text_1').value + 2;
    $('input_text_3') = $('input_text_2').value * 10;
  });
});
Not tested and may need debugging.

Note that 'input_text_1' is the ID of the form element.

Bob
hilas 21 Sep, 2011
Hello GreyHead

Well, thank you very much for the reply, the problem is not so much about "how to" this code where I have it set? , And secondly it will be to form which I have several boxes of income such as name, surname, email .. and also the summation and multiplication box, then where I have to put this code and do not need anything else? or is it just that code and nothing else?


pd: no any chat, type "irc" or something to chat in real time, sorry I'm just a little scared, as this is for my work and I have to deliver tomorrow and if not surrender, I lose my work: '(if you manage to help me I'll give you a discount of Starbucks (starucks work) or some gift Greetings!
GreyHead 21 Sep, 2011
Hi Hilas,

Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.

Bob
hilas 21 Sep, 2011
i'm usin Joomla 1.5 with chrono forms v4 and chrono connectivity (wich dont work)

but i think that i need to change to joomla 1.5 becouse i need the chrono connectivity . there is some chat for chat with you ? plz
GreyHead 21 Sep, 2011
Hi hilas,

In ChronoForms v4 you can use the Load JS action to add JavaScript to your form.

As I said in the other post you can add filters with the ChronoForms v4 DB Load Multi Record action, you don't need ChronoConnectivity.

I suggest you focus on getting a basic form working, then add the calculations and filters later.

Bob
hilas 21 Sep, 2011
really so i dont need to downgrade to Joomla 1.5 ? Omg .. so.. but i dont know how i have to do .. plz help me .. step by step plz . =D really i need this for help my work (its the 2 thing that i need this an the other post)
This topic is locked and no more replies can be posted.