You are viewing limited content. For full access, please sign in.

Question

Question

add fields to a table between forms

asked on July 21, 2015

Could not find a related post so here goes.  Base form to be filled out by end user requesting travel has a table static with 9 rows and 3 columns.  

We want the Estimated Expense column (required) to be displayed on the first form to the end user.  All three columns (Source columns to be required if there is a value in the associated expense column) to be displayed on the second form presented to the Site Administrator during the approval process.

Any ideas on how to do this?  I was thinking about js based on CSS class assigned to the columns but I am not sure what the code should be.

The current code that I am using for calculating totals and such is the following:  

$(document).ready(function() {
  $('.Submit').hide();
  $(document).on('blur change', '.estExpns input', esttotal);
}); 

// Table Sumations

function parseNumber(n) {
  var f = parseFloat(n); //Convert to float number.
  return isNaN(f) ? 0 : f; //treat invalid input as 0;
};

function esttotal() {
  var s = 0;
  $('.estExpns input').each(function () {
    s += parseNumber($(this).val());
  });
  $('.estTotal input').val(s);
};

I am open to any ideas, Thank you in advance.

0 0

Answer

SELECTED ANSWER
replied on July 21, 2015

Hi there,

You can create two forms, in each form choose different columns you want to display when Edit the table field dragging from the table variable. 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.