PotatoMato Posted January 29, 2022 Report Share Posted January 29, 2022 Hi, guys. Sharing this solution with you on how to add an emoji status once a user uploads a file (any type of file) in a submission form. Without file: With file: For this, we will be needing a File field, Virtual field, and the Status field (text field) where we will be saving the status emoji. The use of the Virtual field is to display the emojis . Add a header and footer and insert the code below on the footer: <script> document.addEventListener('DataPageReady', function (event) { var stat= document.querySelector("input[name='InsertRecordStatus']"); var label= document.querySelector("div[data-cb-cell-name*='cbParamVirtual1']"); var file = document.querySelector("input[name='InsertRecordFile1']"); if (file.files.length == 0) { stat.value = "❌"; label.innerHTML = "❌"; } else { stat.value = "✔️"; label.innerHTML = "✔️"; } document.querySelector("input[name='InsertRecordFile1']").addEventListener('change', function() { if (file.files.length == 0) { stat.value = "❌"; label.innerHTML = "❌"; } else { stat.value = "✔️"; label.innerHTML = "✔️"; } }); }); </script> After that, hide the Status field using: https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-hide-fields-in-datapages/. Hope this helps!! Quote Link to comment Share on other sites More sharing options...
PotatoMato Posted January 29, 2022 Author Report Share Posted January 29, 2022 If you wish to use other set of emojis, you may check this link: https://unicode.org/emoji/charts/full-emoji-list.html Quote Link to comment Share on other sites More sharing options...
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.