Jump to content

Auto submit and combine fields


Recommended Posts

Good Morning,

 

Can anyone help me out. I'm trying to combine fields and then auto submit. It works fine until I add in the auto submit code in the footer. It'll auto submit fine, but no longer combines the fields 

 

 

<SCRIPT LANGUAGE="JavaScript">

function concatenate()
{
var teammembers = document.getElementById("EditRecordteammembers").value;
var lastadd= document.getElementById("EditRecordlastadd").value;

var teammembers = teammembers + " (" + lastadd + ")";

document.getElementById("EditRecordteammembers").value = teammembers;

}

document.getElementById("caspioform").onsubmit=concatenate;


if(document.getElementById("caspioform")) {   document.getElementById("caspioform").style.display = 'none';   setTimeout('document.forms["caspioform"].submit()',1500); }  </script>

Link to comment
Share on other sites

On 1/25/2017 at 10:08 AM, Pulford said:

Good Morning,

 

Can anyone help me out. I'm trying to combine fields and then auto submit. It works fine until I add in the auto submit code in the footer. It'll auto submit fine, but no longer combines the fields 

 

 

<SCRIPT LANGUAGE="JavaScript">

function concatenate()
{
var teammembers = document.getElementById("EditRecordteammembers").value;
var lastadd= document.getElementById("EditRecordlastadd").value;

var teammembers = teammembers + " (" + lastadd + ")";

document.getElementById("EditRecordteammembers").value = teammembers;

}

document.getElementById("caspioform").onsubmit=concatenate;


if(document.getElementById("caspioform")) {   document.getElementById("caspioform").style.display = 'none';   setTimeout('document.forms["caspioform"].submit()',1500); }  </script>

Hi,

I modified script a little bit, now it calls function, which concatenates and submits the form:

<SCRIPT LANGUAGE="JavaScript">
function concatenate()
{

var teammembers = document.getElementById("EditRecordteammembers").value;
var lastadd= document.getElementById("EditRecordlastadd").value;

var teammembers = teammembers + " (" + lastadd + ")";

document.getElementById("EditRecordteammembers").value = teammembers;

document.forms["caspioform"].submit();
}

 if(document.getElementById("caspioform")) {
  document.getElementById("caspioform").style.display = 'none';
  setTimeout(concatenate,1000); } 


 </script>

 

Link to comment
Share on other sites

I'm working on my last issue in my program. Does anyone have a script for this:

 

 I have a radio box filled with two options. I also have a second hidden field. 

 

If the first radio option is picked, I want the hidden field to get a value of A. If the second radio option is picked, I want the hidden field to get a value of B. 

 

 The radioboxx field has its own value that it gets, so that hidden field is separate,  but I wanted to bill based on which selection is made. 

 

Thanks

Mark

Link to comment
Share on other sites

  • 3 weeks later...
On 1/27/2017 at 11:51 AM, Pulford said:

I'm working on my last issue in my program. Does anyone have a script for this:

 

 I have a radio box filled with two options. I also have a second hidden field. 

 

If the first radio option is picked, I want the hidden field to get a value of A. If the second radio option is picked, I want the hidden field to get a value of B. 

 

 The radioboxx field has its own value that it gets, so that hidden field is separate,  but I wanted to bill based on which selection is made. 

 

Thanks

Mark

Hi Mark,

I found out the following solution. I suppose that you have a submission form.

Create a separate lookup table and for each value in radio button assign needed value.

E.g. field1       field2

       value1       A

       value2       B

Then make hidden field to be cascading text field, use radio button field as a parent field, use recently created table as a datasource, also filter  values on field1. I'm attaching a screenshot.

 

If you need to hide cascading field, you may do that using html blocks. 

child.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...