Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By GianYagami

I've tried to make javascript which is dump every textinput. this grid acts as viewer instead of manual input.
I've tested the grid by hardcoding value to simulate the grid has a value.
if the grid is empty, I want to hide subform and delete all rows, this is frustating because by default, the grid is ready to fill with empty 1 column. My code is:
Code: Select all

var remarks = $('#1582424765e5792442e33b4075111111').find('#grid_rem_approvalsheet').getValue();

var aData = [
        {value: "Sarah Means"}, //textbox
        {value: "1"          }, //checkbox is "1" or "0"
        {value: "2015-10-25" }

function checkRemarksGrid(item,index){
  let columnEmpty = 0;
  item.forEach(function(item, index){
    if(item == '' || item == null){
  if(columnEmpty == item.length){
  //check if all column empty, then hide subform "1582424765e5792442e33b4075111111"

  //check if has no remarks, then hide subform "1582424765e5792442e33b4075111111"
    //checkRemarksGrid(remarks[0]); //just check first row, we don't need to check the rest
  	//remarks.forEach(checkRemarksGrid); //I just changed my mind, I want to delete if there's empty row. leaving it blank 'no data" instead of empty 1 row

Sometimes the data comes from a user, like when a […]

Found the solution here:[…]

Learn what's new in ProcessMaker 3.6! We are proud[…]

Hello, I have a case that appears both as comple[…]