I've done this before, but the mind is slipping.
When I exit a field I want to set another fields value to the value of the field I just exited.
Setting a field value
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
-
-
- Posts: 1440
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Setting a field value
Still not clear to be honest. It might take events for sure. Provide a demo of your page if possible.
- BaconFries
-
- Posts: 5653
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Setting a field value
Previously asked see Pablos reply on the use of "Conditions"
viewtopic.php?p=463283#p463283
viewtopic.php?p=463283#p463283
Re: Setting a field value
This is not necessarily a 'Condition' situation.
I always want field 2 to show the value entered in field1 after field 1 loses focus.
I always want field 2 to show the value entered in field1 after field 1 loses focus.
- BaconFries
-
- Posts: 5653
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Setting a field value
So let's read this again...what your wanting is this for example user types username in input field1 and then onfocus input field2 username is inserted without retyping? If so see the following for information only.
https://www.plus2net.com/javascript_tut ... a-demo.php
https://jsfiddle.net/2maw8xo4/1/
https://jsfiddle.net/f84shzxu/
https://www.plus2net.com/javascript_tut ... a-demo.php
https://jsfiddle.net/2maw8xo4/1/
https://jsfiddle.net/f84shzxu/
-
-
- Posts: 1440
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Setting a field value
Thanks to @bacon I made a script for you : )
Code: Select all
<script>
document.getElementById("field1").addEventListener("blur", function() {
var x = document.getElementById("field1").value;
document.getElementById("field2").value = x;
});
</script>
Re: Setting a field value
Problem resolved - Thanks to all for your replies.
I put a Condition on Field 1 - On Change Calculate Field 2 = [Field 1].
Found that it DOES NOT work if Field 2 has a Floating Label.
Remove the Floating Label and all is right with the world.
Thanks Again!!!
I put a Condition on Field 1 - On Change Calculate Field 2 = [Field 1].
Found that it DOES NOT work if Field 2 has a Floating Label.
Remove the Floating Label and all is right with the world.
Thanks Again!!!