Page 1 of 1

user to be able to select from a select drop down and have the value of the select auto populate an input field.

Posted: Fri Sep 05, 2014 11:17 pm
by Vinny B

Hello

I want the user to be able to select from a select drop down and have the value of the select auto populate an input field.

I have this code
$('select').on('change', function(){
$('#CalABCD2015_overlayName').val($(this).val());
});

but it has two problems

1) I have 3 select fields and with the above code they all effect the label and I only want one to,

2) it only works after the user makes two choices.

Thanks for your help
Vinny


user to be able to select from a select drop down and have the value of the select auto populate an input field.

Posted: Sat Sep 06, 2014 12:48 pm
by Vinny B

Forget it. LOL. Im trying something new, If I need help I will off course ask.


user to be able to select from a select drop down and have the value of the select auto populate an input field.

Posted: Sat Sep 06, 2014 1:59 pm
by obullei

Hello!

Thank you for your update.
We are happy to hear this news from you.


user to be able to select from a select drop down and have the value of the select auto populate an input field.

Posted: Wed Sep 17, 2014 3:13 pm
by Vinny B

Im back to this question. I need a list to populate a input field.

The list has 5 options. a,b,c,d,e

If b is chosen then a 12 will appear in a input field
If c is chosen then a 24 will appear in a input field.

overlayOweOwed is the list field
overlayHours is the input field

//////////////////////
This is the code I have
var v = this.getField("overlayOweOwed").value;
var q = this.getField("overlayHours");

if (v=="Overtime 12 Hours Day") q.value="12";
else if (v=="Overtime 12 Hours Night") q.value="12";
else if (v=="Overtime 24 Hours") q.value="24";
else event.value = "";

Any items?
Do i set button action to on-click or value change or something else?

Thank You
Vinny


user to be able to select from a select drop down and have the value of the select auto populate an input field.

Posted: Wed Sep 17, 2014 4:54 pm
by Vinny B

Hello

Code: Select all

A friend came over and solved this problem for me. The code is below. I appreciate your help anyway. 

var v = Appery('overlayOweOwed').val();
var q = 'overlayHours';

if (v=="Overtime 12 Hours Day") Apperyio(q).val('12');
else if (v=="Overtime 12 Hours Night") Apperyio(q).val('12');
else if (v=="Overtime 24 Hours") Apperyio(q).val('24');
else Apperyio(q).val('');

Thank You
Vinny


user to be able to select from a select drop down and have the value of the select auto populate an input field.

Posted: Wed Sep 17, 2014 5:09 pm
by Evgene Karachevtsev

Hello Vinny,

Thank you for the update, glad it works!