JavaScript
Public Group
Public Group
Active 3 weeks ago
This group is focused on customization specifically using JavaScript. If you have cool tools and want... View more
Public Group
I’m not a Coder
Tagged: KGK
-
I’m not a Coder
Posted by Kenneth Korp on September 6, 2024 at 7:49 amI’m working on a Bluebeam PDF football pool challenge that seemed straightforward at first, but it’s turned out to be more complex than I anticipated. I’m not a JavaScript coder and could really use some help. If anyone is willing to take a look at the PDF, I’d appreciate some guidance on whether what I’m trying to achieve is even possible.
Thanks in advance!
Isaac Harned replied 1 month, 3 weeks ago 3 Members · 10 Replies -
10 Replies
-
Points: 23,485Rank: UC2 Brainery Brown Belt III
I’m not sure I have the expertise, but I love it when Bluebeam is used for fun stuff like this. I think it sharpens our skills and allows the software to flex once in a while. Once you get it to work, we’ll have to work together on a blog post. If you’d like, you can share the PDF here and give more details about the issue.
-
Points: 301Rank: UC2 Brainery Newbie
Hi Troy,
Thank you for your interest in helping me with this dilemma—I really appreciate your input!
Here’s my goal: I want to make the form easy to fill out when it’s first distributed to participants, and I’d like it to serve as a reusable template for future years.
1. Team Selection: I want to start by selecting teams from the previous year, beginning with the best teams in group #1 and working down to the worst teams in group #6.
2. Locking Teams: Once the teams are selected for each group, the person managing the poll should be able to lock in these selections so they can’t be modified.
3. Participant Selection: After the teams are locked, the form will be sent out to the participants, allowing them to choose one team from each group.
4. Dropdowns for Final Selection: At the bottom of the form, I’d like six independent dropdowns. Each dropdown will show a list generated from the initial group selections made by the poll manager, which cannot be altered.
5. Submission: After the six selections are made, there should be a button that allows the user to lock in their choices and send a new PDF with the selections to a specified email address.
Let me know your thoughts on this!
Thanks,
Kenneth
-
-
Points: 8,053Rank: UC2 Brainery Purple Belt III
I’m don’t consider myself expert, but may be able to help
-
Points: 8,053Rank: UC2 Brainery Purple Belt III
Ok, you were on the right track, and I see you are using Chat GPT, which will help. Most of the issue I think was that you need to populate the actual field names instead of jsut “dropdown 1” etc. Here is the conversation I am having with chat. I have most values populating into the list, except for 49rs, which is giving me some issues. Will follow up later as well as a way to lock the fields and submit via email. more than likely can get it done:
Also, make sure that “1:” through “6:” are already built as dropdowns. The call for “populateDropdown();” should be in every “Group” dropdown as an action, I prefer on mouse blur, that way it works universally on any system including iPad, but up to you.
https://chatgpt.com/share/2b41d812-6299-49d8-a417-bd6ce87f4a5f
-
Points: 8,053Rank: UC2 Brainery Purple Belt III
Here is a simple sample for locking a form field, but I assume you will want some kind of password system, we’ll work on that:
var field = this.getField(“fieldName”);
if (field != null) {
field.readonly = true;
}
-
Points: 301Rank: UC2 Brainery Newbie
I’m not sure where all the code goes, I was experimenting and not even sure where and\or how to test it.
Any thoughts
-
Points: 8,053Rank: UC2 Brainery Purple Belt III
The large chunk of the code will be global, under “Tools/Form/JavaScript”. Then you should place the “populateDropdown();” in the Properties/Actions of each “Group” dropdown. As far as the locking for form fields, it should be it’s own button. The locking code will need some tuning, probably a Regular expression to find all the fields that start with “Group”. GPT can help you sort that out. I haven’t been able to come back to this yet, but the print and email may be a little bit difficult with normal javascript as there is not yet a way to call out to other programs for actions like that as far as I can tell. But, if everyone is using bluebeam it can be simple to add a “Script” (different from JavaScript, these are kind of like bluebeam macros, the Script Reference doc on BB website relates specifically to these, and you can find them under “Document/Scripts”). Specifically there is a pre-built “Flatten and Print” button you can add to your toolbar that can automate this and pull up the email with attachment already created.
-
Points: 301Rank: UC2 Brainery Newbie
The code looks great, and I successfully got the list to populate in the “1:” dropdown. I followed the same steps for the “2:” dropdown, but unfortunately, I’m not seeing any results. I’ve tried several approaches without luck, and it’s still not generating a list for “2:”.
Could anyone share a few screenshots to clarify what code should go in the Global Script section versus the Dropdown field? I’m a bit confused about how these should be structured.
Thanks in advance for your help!
KGK
-
-
-
Points: 8,053Rank: UC2 Brainery Purple Belt III
OK, modified the code so that you can pass the field name and group in the function call, this will make it work for any dropdown that you want to grab from whichever group needed. This will need to be placed in the dropdowns up top where you are selecting the group teams. I did have to rename the field on the bottom, I think the colon in the previous name was giving me issues. Here is a couple of snapshots showing my locations and the file back with the first couple of groups loaded and set. 49rs still not working. I may have to get it to pass something different without numbers so the code knows what to do.
Log in to reply.