Parma2015 Posted October 21, 2015 Report Share Posted October 21, 2015 Hi! I am trying to create an input form with a spin button for increasing or decreasing an input value (integer). Does anyone know how to achieve this? I am planning to use it in a form where the user shall register work hours. Quote Link to comment Share on other sites More sharing options...
Aurora Posted October 21, 2015 Report Share Posted October 21, 2015 Hello Parma2015! First of all, please read this forum question, it might be useful for you. As far as I know, there is no Spin Button option in Caspio, that's why I use dropdown for this case. I have a LookUp table with hours and use it as a source for my Hours_Field in the main table. I hope this helps. Aurora Quote Link to comment Share on other sites More sharing options...
Parma2015 Posted October 21, 2015 Author Report Share Posted October 21, 2015 Hi! Thanks! A dropdown is what I also have come up with so far. I want to have input on both start hour, start minute, stop hour, stop minute and also minutes of lunch break. Now I use dropdowns, but I am not quite satisfied with it... Regards Jan H Quote Link to comment Share on other sites More sharing options...
Aurora Posted October 21, 2015 Report Share Posted October 21, 2015 Jan, Please try this script: <SCRIPT LANGUAGE="JavaScript"> var x = document.getElementById("InsertRecordYour_Field"); x.setAttribute("type", "number"); </SCRIPT> This script adds spin button when you type a number in the field. Aurora Quote Link to comment Share on other sites More sharing options...
Parma2015 Posted October 23, 2015 Author Report Share Posted October 23, 2015 Hi! I tried, but I couldn't make it work. No spin button appeared... I have a number field and I added the code as dercribed. Should there be some more code to specify i.e the step? Jan H Quote Link to comment Share on other sites More sharing options...
Aurora Posted October 23, 2015 Report Share Posted October 23, 2015 Hi Parma 2015! Please tell me, what DataPage do you use? Is it Update form or a Submission form? Aurora. Quote Link to comment Share on other sites More sharing options...
Parma2015 Posted October 23, 2015 Author Report Share Posted October 23, 2015 Hi! It's a submission form. :-) Jan H 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.