AnsweredAssumed Answered

How to make the value of 1 field default value for second field if user enter no value in second field

Question asked by Rahul Sharma on May 9, 2016
Latest reply on May 10, 2016 by Rahul Sharma

I have a doubt regarding the default value for a single field in custom module.   I have created two  fields, Field 1(integer type) and Field 2(integer type). i want to make sure that if user enters no value in the Field 2 and save the form, then the value of Field 2 should be saved equal to the value of Field 1 entered by the user.

 

 

if ($_POST(Field2)== 0)

if submit

then

Field2 =  $_POST(Field1) ;  

 

I  want to know that how we can impoelment it?

Outcomes