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

Question

Question

Emailing Table Field Values from Forms

asked on October 3, 2017

Hi All,

 

I have been reading on answers a few different methods of doing this, and would like the option of using Forms instead of creating a whole new Workflow for this process, can this be done using Forms processes? 

 

Basically, the client starts a form and specifies requirements that are set in a table format as per below:

They can add multiple entries as required which will then be emailed to the client once Submit has been Pressed. i.e 

When Submit is pressed, an email is sent out to the client with the information set on the Form including the Table values. Issue is though, settings the values in the Email Process as per below:

Will have an output of:

1, 2, 3 - Provide Document X, Provide Document Y, Sign Off Document Z; 

 

Ideally I would like this to be in a per line format within the Email. Can this be done within the Form? and if so, how? 

 

Thank you in advance,

Ziad

 

0 0

Answer

SELECTED ANSWER
replied on October 5, 2017

Hi Ziad,

 

The multiline fields need to be targeted as 'textarea' instead of 'input'. I.e. ('.details textarea').val ();

You could test it in the js/css window first before hiding the field so you can see if it is working for you or not.

 

Regards,

Aaron

0 0

Replies

replied on October 4, 2017 Show version history

Hi Ziad,

Can you achieve what you want with a separate hidden multi line field? This LF answers post points you in the right direction. You can then call upon the hidden Text field variable for your input? I modified the code in the post slightly to accommodate users clicking within the table and general tabbing accross the form. The click is necessary if you want the output to update when a user removes a row.

$(document).ready(function(){
//Sets function to call upon later
  function populateTextArea(ind){
    var str = '';
// css class of the Table is table
    $('.table.cf-table-block tr').each(function(ind){
      if (str != '') str = str+'\n';
     if (ind != 0) str = str+$(this).find('.number input').val()+' - '+$(this).find('.details input').val();
    });
    $('.output textarea').val(str);
  }
// q4 is the Table Id
  $('#q4').on('change blur', populateTextArea);
  $('#q4').on('click blur', populateTextArea);
  
});

In this example, I have two columns in the table with css classes of 'number' and 'details' (single line fields). The information is outputting to a multiline field with a css class of 'ouput'. 

1 0
replied on October 4, 2017

Hi Aaron,

 

Should / would this still function when using multiline fields? I have just tried this but the hidden field returns nothing. 

 

Thanks

Ziad

0 0
SELECTED ANSWER
replied on October 5, 2017

Hi Ziad,

 

The multiline fields need to be targeted as 'textarea' instead of 'input'. I.e. ('.details textarea').val ();

You could test it in the js/css window first before hiding the field so you can see if it is working for you or not.

 

Regards,

Aaron

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

Sign in to reply to this post.