Forums

use values agin

sonofsundyata 17 Mar, 2015
I have a form where i ask people to enter their name, On another slider i do again, but i want to fill in previous given name. How do i do that ?? for explaination see below.

Slide container 1: lastname contact. (if filled, a hidden container appears, with more details)

Slide container 2: lastname contact (prefilled value from container 1) , how can i fill it with the name given above ?
(hidden first) surname contact, age, workadress etc.
sonofsundyata 17 Mar, 2015
I mean, do i need JS or do i have to use a variable in the value field on the second container ??
sonofsundyata 17 Mar, 2015
[attachment=0]Test form view JS idea.png[/attachment]
[attachment=1]form designer.png[/attachment]
[attachment=2]designer events.png[/attachment]
[attachment=3]javascript action on load.png[/attachment]

Hi sonofsundyata,

Please check this StackOverFlow answer.

Bob




That's clear. But how do i inplement this JS in my form ? There are so much options where you can enter JS.

If i use the following js, How can i implement it and specially Where, in which fields etc. I have a simple form to test.

I can't figure out where to put the code.

/* INPUT TEXT1 VALUE TO TEXT2 ON TEXT1 KEYUP*/
$("#text1").keyup(function() {
$("#text2").val($("#text1").val());
})
GreyHead 17 Mar, 2015
Hi sonofsundyata,

Drag a Load JavaScript action into the On Load event in the Setup tab. Move it up before the HTML (Render Form) action.

Bob
sonofsundyata 17 Mar, 2015

Hi sonofsundyata,

Drag a Load JavaScript action into the On Load event in the Setup tab. Move it up before the HTML (Render Form) action.

Bob



ok i've done that, but do i have to call the function somewhere ?
sonofsundyata 17 Mar, 2015

Hi sonofsundyata,

Drag a Load JavaScript action into the On Load event in the Setup tab. Move it up before the HTML (Render Form) action.

Bob



ok i've done that, but do i have to call the function somewhere ?



I mean, i try'd it just with the js action, but that isn't working
This topic is locked and no more replies can be posted.