asked on September 11, 2017
Good day all.
i found a thread in a previous post on lf answers to customize the state field in the address field to a dropdown menu with options. See code below :
$(document).ready (function () { $(".State").siblings().text('Province'); $(".Postal").siblings().text('Postal Code'); $("input[id*=_DSG3]").siblings().text('Province'); $("input[id*=_DSG1]").parent().children().css('display', 'none'); //hides address 2 $(".Country").parent().children().val("South Africa"); $('.State').replaceWith('<select name=""Field1_DSG3" class="form-item-field State" vo="e" id ="Field1_DSG3">'+ '<option></option>' + '<option value="Gauteng">Gauteng</option>' + '<option value="KwaZulu">KwaZulu-Natal</option>' + '<option value="EasternCape">Eastern Cape</option>' + '<option value="FreeState">Free State</option>' + '<option value="Limpopo">Limpopo</option>' + '<option value="Mpumalanga">Mpumalanga</option>' + '<option value="NothernCape">Northern Cape</option>' + '<option value="North West">North West</option>' + '<option value="WesternCape">Western Cape</option>' + '</select>'); });
The problem i am facing is that when i do select a state, it does not get saved on the form. In the next user task, the state field is blank and it also saves on the repository blank.
Any suggestions on how to solve this?
Thanks.
0
0