Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. Choose Bean Shell Form Binder as the Form's Store Binder.
  2. Key in the following code.

    Code Block
    import org.joget.apps.app.service.AppUtil;
    import org.joget.apps.form.model.Element;
    import org.joget.apps.form.model.FormRowSet;
    import org.joget.apps.form.model.FormData;
    import org.joget.apps.form.lib.WorkflowFormBinder;
    import org.joget.commons.util.LogUtil;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.sql.DataSource;
    
    rows.get(0).setProperty("field2", rows.get(0).getProperty("field1"));
    
    new WorkflowFormBinder().store(element, rows, formData);

    In the code above, it will copy the value from form element with id "field1" into "field2".

  3. Save the form.