Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms Pro › Picklist Delete Values?
- This topic has 2 replies, 2 voices, and was last updated 1 day, 10 hours ago by
Shane.
-
AuthorPosts
-
November 27, 2025 at 9:21 AM #53316
ShaneParticipantHey all, sorry to post so much but I’ve been spending a lot of time trying to explore the power of the Javascript API and I keep running into roadblocks while trying to create features for my project manager in Tapforms Pro. I just want to check my understanding of some of the JS functions.
I know you can add values to a pick list by using the addValue method on a pick list object. I discovered that this will permanently add values to the pick list. I thought it would be cool idea to be able to dynamically create a pick list for a text field based on what’s happening in the form, but the addValue method is permanent. It would be cool to have a deleteValue which would allow for dynamically generated pick lists for a form/ document.
Thanks.
November 27, 2025 at 10:14 AM #53317
Daniel LeuParticipant‘deleteValue()’ exists, but it’s not documented. I noticed in the past, that sometimes, changing the picklist on the fly doesn’t properly update until reopening the document. But this might have been fixed in the meantime.
See here for some more hidden API features: https://lab.danielleu.com/tapformspro/tips-tricks/index.html?p=Tap-Forms-Pro—The-Unofficial-API#section-picklists
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricksNovember 27, 2025 at 2:32 PM #53322
ShaneParticipantI did logically try that even before seeing it on your website and it didn’t do anything. However like you say, sometimes things are finicky as to when TFP updates so I’ll have another go at it.
Also undocumented is how to spit out values of a sorted pick list array. It was intuitive and I figured it out, but in case anyone’s searching for it:
var sortedList = pickList.sortedValues; for (var index = 0, count = sortedList.length; index < count; index++){ console.log(sortedList[index].value); } document.saveAllChanges(); }Adding a “.value” at the end of the indexed array will spit out the pick list value in typical javascript fashion.
-
AuthorPosts
You must be logged in to reply to this topic.