Jump to content

NJVideoGuy

Members
  • Posts

    3
  • Joined

  • Last visited

NJVideoGuy's Achievements

  1. Is there a way to highlight the contents of one (or more) fields based on the value of another field? Using modifications to the solutions provided above, I am able to change the background of a field if the contents in that field equal a specific value, but how can I do this based on another field's value? I've tried modifying it like this but it doesn't work, it changes the background on every cell in columns 2 and 3, not just the ones that have the 'DealerList' variable set to 'ABC': if('[@field:DealerList]' == 'ABC') { document.addEventListener('DataPageReady', function(event) { const statusField= document.querySelectorAll('td:nth-child(2),td:nth-child(3)'); // '2, 3' are field numbers for which styles have to be applied statusField.forEach(element => { {element.style.cssText = 'background: #ff4600; font-weight: bold';} }); }); } This is what I would like it to look like: But this is what I keep getting:
  2. I'm trying to do something similar and I found this thread. When I apply the following code to my HTML Block, it only affects the first line on my data listing page. I set an alert to try to see what the value was and it appears that its referencing the last record in my list that is empty, not the current one. (If I add data to that item, then it references the next item in the list that is empty...) Perhaps the code needs to be somewhere else? What am I missing? Any assistance would be appreciated. Here is the code I have in my HTML Block <script type="text/javascript"> function hideBlocks() { var zipValue = '[@field:Project_Notes]'; var RecNum = '[@field:Record_Number]'; if(zipValue.length==0) { document.getElementById('box1').style.visibility = 'hidden'; window.alert(zipValue + RecNum); // This is the alert I was using to troubleshoot } document.removeEventListener('DataPageReady', hideBlocks); } document.addEventListener('DataPageReady', hideBlocks); </script> <div id="box1" class="tooltip" href="#">NOTES<span class="classic"> [@field:Project_Notes]<br/> </span></div>
  3. Looking for a way to make form submission errors more obvious. I have a number of fields that become required based on rules during data entry. When hitting update or submit, if a required element is missing the form just goes back to the top and in small black print it says "You did not enter valid information in one or more of the fields" Sometimes my users miss this notification because it just looks like the other text on the page. Is there a way to have an alert popup on the screen when a form is not filled out properly upon submission? Thanks!
×
×
  • Create New...