I want to change a header of submission datapage based on a comparison between two virtual fields on the page. The virtual fields are fixed values for the record drawn from an underlying query, using dropdown values.
If Virtual 2 <> Virtual 3 a section with a submission field for the Financial Statement Report is hidden (via Rule 1) , and if Virtual 2 = Virtual 3 the same field is set to be required (via Rule 2).
I did not create the header, but it looks currently like this:
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.
Question
vanderLeest
I want to change a header of submission datapage based on a comparison between two virtual fields on the page. The virtual fields are fixed values for the record drawn from an underlying query, using dropdown values.
If Virtual 2 <> Virtual 3 a section with a submission field for the Financial Statement Report is hidden (via Rule 1) , and if Virtual 2 = Virtual 3 the same field is set to be required (via Rule 2).
I did not create the header, but it looks currently like this:
<div class="container mt-3 mb-3">
<div class="row">
<div class="col mb-3" style="display:inherit !important;">
<h4>Add your Invoice and a Financial Statement Report</h4>
<a href="https://c4ffn695.caspio.com/folderlogout" class="ml-auto btn btn-secondary">Logout</a>
</div>
</div>
<div class="row">
<div class="col">
If Virtual 2 <> Virtual 3, I want to header to read 'Add your Invoice' and if not 'Add your Invoice and the Financial Statement Report'
I tried (to no avail) - with different header values - the following script in the Footer
<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {
if ("[@cbParamVirtual2]" == "[@cbParamVirtual3]" ) {
document.querySelector("h4").innerHTML="Some title"; }
else {
DataPage, you may try document.querySelector("h4").innerHTML="Other title"; }
});
</script>
But I am no JS expert
Any help sincerely appreciated
Floris
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
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.