1
0
-1

Hi,


Is there different compability? When submit data for Rich Text Editor input for subform table, it didnt work. Data didnt save. Before this, using Joget v4 and v5 works fine. After upgrade to v6 i faced this issue. Text area and input fields just working fine.


<script>

$(document).ready( function(){

$('#assignmentComplete,#submit').click(function() {

$('[name$=LogRemark]').val($('[name$=log_remark]').val());  <------ here the column for rich text editor

$('[name$=LogStatus]').val($('[name$=status]').val());

$('[name$=LogPosition]').val($('[name$=Position]').val());

});

});

</script>

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      I had to look up https://www.tiny.cloud/blog/how-to-get-content-and-set-content-in-tinymce/ to use their script to get the RTE value, and got this working in Joget v6 and DX. The code is in two parts:

      • 1st part gets the "data-id": FormUtil.getField("RichTextField").attr("id")
      • 2nd part pass the data_id to tinymce.get() function call: tinymce.get( "[data_id_value]" ).getContent();

      You can then use the return value from 2nd part to assign to another form field (The field is "Copy" in this example).

      <script>
      $(document).ready( function(){
      	$('#assignmentComplete, #submit').click(function() {
      		var rteValue = tinymce.get( FormUtil.getField("RichTextField").attr("id") ).getContent();
      		$('[name$=Copy]').val( rteValue );
      	});
      });
      </script>
      1. jogetuser

        Tq very much! Its working.

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hi,

      I think something is wrong with your jquery selector. It's missing double quote :

      $('[name$="LogRemark"]').val($('[name$="log_remark"]').val()); 

      1. jogetuser

        This works fine on Joget v4 and v5.


        <script>

        $(document).ready( function(){

        $('#assignmentComplete,#submit').click(function() {

        $('[name$=LogRemark]').val($('[name$=log_remark]').val()); <------ here the column for rich text editor

        $('[name$=LogStatus]').val($('[name$=status]').val());

        $('[name$=LogPosition]').val($('[name$=Position]').val());

        });

        });

        </script>


        On Joget v6 only the column with rich text editor input didnt work (only submit blank input). other input just working fine.

      CommentAdd your comment...