Jump to content


  • Content Count

  • Joined

  • Last visited

About vinebath

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey there, You can try something like what I built for my usage: In here, the trigger built in (aaa) table and on record update, fields updated are inserted into (aaaa) table. If Name was changed, Info field will be blank, and vice versa. ID is there to make sure records are connected, so kinda for relationships. Feel free to copy-build such blocks for all of the fields that you have and would like to be ignored if they were not changed. Hope this helps!
  2. vinebath

    Time input mask

    Hey Vitalikssssss, You can try using this code in the footer of the page: <script> window.onload = function () { document.getElementById('InlineAddFieldname').addEventListener('input', function (w_e) { //here instead of Fieldname insert the name of the field that should be masked if (!isNaN(w_e.data) && w_e.data !== ' ') { if (this.value.length >= 2 && !this.value.includes(':')) { this.value = this.value.slice(0, 2) > 23 ? 23 : this.value.slice(0, 2) + ':' + this.value.slice(2, 3); } if (this.value.length == 3 && this.value.includes(':')) if (!this.value.includes('0')) this.value = parseInt(this.value); else this.value = this.value.slice(0, 2); if (this.value.length > 3) this.value = this.value.slice(0, 2) + ':' + (this.value.slice(3, 5) > 59 ? 59 : this.value.slice(3, 5)); prevVal = this.value; } else this.value = prevVal; }) }; </script> This code however does not process manual pasting of values. If needed, I can try and think of something to avoid this.
  3. Firstly, you should have two tables: 1. Source table with the records, and two fields of these records should be two dates that will set the period. 2. A table where you store holidays dates. You should create a datapage on the first table and create a Calculated Field on the "Configure Results Page Fields" screen with the following code: SELECT (DATEDIFF(dd, [@field:Date1], [@field:Date2]) + 1) -(DATEDIFF(wk, [@field:Date1], [@field:Date2])*2) -( SELECT Count(*) FROM Holidays WHERE (Date BETWEEN [@field:Date1] AND [@field:Date2]) AND (DATENAME(weekday, Date) != 'Sunday' AND DATENAME(weekday, Date) != 'Saturday') ) [@field:Date1] is a start date and [@field:Date2] is an end date, and Holidays is a table with the holidays days.
  4. Hello Alison, If you have this element in the HTML: <input type="text" id="txtbox" /> you can apply the following JS code instead: var txtBox = document.getElementById('txtbox'); document.addEventListener("keydown", function(event) { if(txtBox.value.length>20){ if(event.keyCode!=8) //backspace check txtBox.style.width = (( txtBox.value.length+1) * 8) + 'px'; //extends the field by 1 character width when key is pressed else txtBox.style.width = (( txtBox.value.length-1) * 8) + 'px';} //shrinks the field by 1 character width when backspace is pressed }); This code will dynamically adjust the width of your field depending on the number of characters. Feel free to adjust this to your needs if something is not meeting your expectations. Hope this helps!
  5. vinebath

    Freezing HTML Header

    I suggest that you check this guide from W3C on how to make a fixed header for you HTML page: https://www.w3schools.com/howto/howto_js_sticky_header.asp There you can see an example and see how it is implemented with the code samples.
  6. vinebath

    JS Signature

    You can download the signaturepad file in the attachments, I found it by googling. As for your other concern, WP does not have open Header/Footer sections to edit/paste things, however, you can install a special plugin for it: https://wordpress.org/plugins/insert-headers-and-footers/ I can also suggest that you use this code instead: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> Since most of WP websites have certificate installed on it, the link with HTTP might be blocked as a result, thus HTTPS link should be used. Hope it helps. jquery.signaturepad.min.js