Help with scripting (need to add text fields + another round of checkboxes)

Hello and thank you so much for taking the time to help me out!

I found this great macro on the forum, but I need to tweak it and I'm a complete beginner, it's reeeeaally hard!
I tweaked the first part, but now, I need to add the following to be display before the checkboxes that are in there already:
"
Name1: (text field)
Email1: (text field)
Name2: (text field)
Email2: (text field)

Project: (text field)

Artist:
Check box1 > A
Check box2 > B
Check box3 > C
Check box4 > D

"
Screen Shot 2022-09-12 at 4.22.53 PM


(upload://qG0i4jqe0V2AdO8FPVJDiJNaGEy.png)
BOX - Test.kmmacros (6.4 KB)

Thank you for your precious help!

Well, you've got your work cut out for you.

I think the first thing you should do is bone up on HTML forms so you understand how to handle text inputs and checkboxes.

Here's a headstart on text inputs in a Custom HTML Prompt:

BOX - Tested.kmmacros (5.6 KB)

You can see a lot of your code isn't necessary.

As for handling checkboxes, take a look at Textcavator 2021 and see if you can figure it out. That uses quite a few form inputs, too.

If you get stuck, come back with a complete form that displays exactly what you want. Don't sweat the formatting (I used a table for alignment here) but do make sure it's got every field you want.

One thing to think about it whether you need to repeat the name/email field or just use the form a second time.

Anyway, good luck!

1 Like

Thank you!! I'll take a deep dive!

Is there some reason you're keen to use custom HTML? As a beginner, I'd think the native KM prompt might be easier for you to deal with:

Here's the prompt it generates:

4 Likes

Oh I would love to stay away from HTML for now!! This prompt is GREAT, thank you!!

1 Like

Do you have lists of the names, emails, projects and artists? If so, a series of Prompt with List actions might save you a lot of time. As an example:

CleanShot 2022-09-13 at 20.21.41

Names- Emails and Artists.kmmacros (23 KB)

Macro screenshot

Put these on your Desktop.zip (3.0 KB)

That looks very fancy! Unfortunately, I won't have lists.

May I ask you what I'm doing wrong here? Trying to copy the Local__Composer 1 in clipboard in order to paste it on a file that I selected and want to rename.

Could you describe the function of this macro in detail? I have a feeling there may be a better way to achieve your goal than copying and pasting. I can already see some logical errors but I think it might be best to start clean.

1 Like

I found a way to do everything that I wanted thanks to this action, it's working great! Thanks!

Sounds like you're well on your way! Have you completed the macro? If you need any further help, just ask.

YES!! And I feel like I just like someone who just found a treasure! Love the use of Variables! Thanks again!

1 Like