Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
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.
User avatar
By lreyes
#826281
Dear Amos,

Greetings from Ecuador. I'm working on a process for my micro-lending startup which runs on ProcessMaker 3.3.0-community. At some step of the process I have a Dynaform which shows the user a Payment Table. The table is implemented as a grid variable named "tabla_solicitantes" and populated in a PHP Trigger which fires before the Dynaform. The table's data consists of amounts of money so we would like to display the table in View Mode and to right-align the table's columns. Shown in the figures below is the desired behavior in Edit Mode.

fig-02_dynaform-lleno.jpg
fig-02_dynaform-lleno.jpg (158.68 KiB) Viewed 4324 times

I have been able to right-align the columns in JavaScript for the case when the grid is in Edit mode, but unfortunately the getControl() function does not work when the grid is in View Mode. The code is shown below.

Code: Select all
$( document ).ready( function()
{
  var numRows = getFieldById('tabla_solicitantes').getNumberRows();
  for ( var k = 1; k <= numRows; k++)
  {
    getFieldById('tabla_solicitantes').getControl( k, 1).css( 'text-align', 'right');
    getFieldById('tabla_solicitantes').getControl( k, 2).css( 'text-align', 'right');
    getFieldById('tabla_solicitantes').getControl( k, 3).css( 'text-align', 'right');
    getFieldById('tabla_solicitantes').getControl( k, 4).css( 'text-align', 'right');
  }
  return;
}
);

Could you please suggest a way for me to change the grid display mode to View but still be able to align the columns to the right?

Thank you!

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]