RE: Submitting form data through second language (Arabic)

Omar Khater, modified 5 Years ago. New Member Posts: 2 Join Date: 12/25/19 Recent Posts
Dear All, 

I am using a normal liferay Form using both languages Arabic & English yet the form data does not submit using the arabic language and i am faced with the following error " Error: there is no specified value for the field" 
Noting that my only validation to this field is making sure the field is not empty - if i remove this validation the form submission works fine.
Can you please explain to me how to resolve this issue i believe that for some reason whenever i fill anything in the field using the Arabic translated form liferay does not submit the value when i click submit therefore i receive this error.
Im Using Liferay 7.1
thumbnail
Vikash Chandrol, modified 5 Years ago. Junior Member Posts: 30 Join Date: 4/18/13 Recent Posts
I think you are using a multilingual field that has validation like required. so before submitting data put an alert and display your entered value on both languages.
Omar Khater, modified 5 Years ago. New Member Posts: 2 Join Date: 12/25/19 Recent Posts
Hello Thanks for the reply, can you please elaborate how is this done?
thumbnail
Vikash Chandrol, modified 5 Years ago. Junior Member Posts: 30 Join Date: 4/18/13 Recent Posts
Add onsubmit event over the form as below
<aui:form onSubmit="validateForm()"> .... </aui:form>  
add javascript function as below 
<script>
function validateForm() {
 var fieldId=$("#fieldId").val();//please replace fieldId with your text field id
alert(fieldId); // check which value coming from the field.
}
</script>