Is it possible to add a label to choices?

Discussion, questions and support.
Post Reply
User avatar
BrittMalka
Posts: 3
Joined: Jul 4th, ’17, 18:12

Post by BrittMalka » Jul 4th, ’17, 18:29

Hi, I'm new to FastKeys, and I'm not sure I can describe what I want... but I'll try.

I'm creating a macro that outputs a HTML form.

I want to be able to add certain list numbers into the form, like this: <input type="hidden" name="lists" value="1,2">

The values vary, and I would like to see a list of options, like 1 = General, 2 = Fiction, 3 = Nonfiction etc. I haven't been able to find anything about that. Can it be done?
User avatar
Tom
Posts: 154
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jul 4th, ’17, 21:06

Right-click on a command field to select HTML format. Than you can paste any html code and FastKeys will run it.

If you just need to send plain text, you can define your selections using Input Selection Forms macro (More/Macros...). To add a label to choices, use a description followed by description separator. The default description separator is "::" and can be changed in Preferences/Text Expander. Example:

Code: Select all

Description1::Text1
Description2::Text2
User avatar
BrittMalka
Posts: 3
Joined: Jul 4th, ’17, 18:12

Post by BrittMalka » Jul 4th, ’17, 21:55

I tried that. Or rather, I had it the other way round, I had

Code: Select all

Text1::Description1
Text 2::Description2
But now I tried your suggestion, but I couldn't make it work. It added both things to the form.

Yes, I only need text output.

This is what I have:

Type: Send

Code: Select all

<form method="post" target="_self" name="nvform" id="nvform" action="http://nvm.%SELECT_NVMDomain%.com/subscriber/optIn.php" autocomplete="off">
   <input type="hidden" name="idGroup" value="1">
   <input type="email" class="inputBox" name="email" value="">
   <input type="text" class="inputBox" id="name" name="name" value="">
	<input type="hidden" name="lists" value="%SELECT_NVMList%">
	<input id="customSubField%INPUT_NVMSubField%" name="customSubField%INPUT_NVMSubField%[]" type="hidden" value="^v">
	<input type="submit" class="nv_submit" id="nv_submit" value="Subscribe"></div>
</form>
When I double-click on NVMList, I have
Type: Checkbox
Selection:

Code: Select all

General::1
Fiction::2
Nonfiction::3
Unknown::6
Change::20
But the generated text gives me:

Code: Select all

<form method="post" target="_self" name="nvform" id="nvform" action="http://nvm.domain.com/subscriber/optIn.php" autocomplete="off">
   <input type="hidden" name="idGroup" value="1">
   <input type="email" class="inputBox" name="email" value="">
   <input type="text" class="inputBox" id="name" name="name" value="">
	<input type="hidden" name="lists" value="General::1,Fiction::2">
	<input id="customSubField44" name="customSubField44[]" type="hidden" value="testagain">
	<input type="submit" class="nv_submit" id="nv_submit" value="Subscribe"></div>
</form>
User avatar
Tom
Posts: 154
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jul 5th, ’17, 14:33

Currently Radio and CheckBox controls do not support description labels. We may add this functionality in the next release. Can you use other control type instead?
User avatar
BrittMalka
Posts: 3
Joined: Jul 4th, ’17, 18:12

Post by BrittMalka » Jul 5th, ’17, 17:33

Not for this one. But thanks for your reply.
gbotes
Posts: 1
Joined: Jul 13th, ’18, 13:45

Post by gbotes » Jul 13th, ’18, 13:48

I seem to be struggling with the same situation for check boxes. I am running Fastkeys 4.10 but no matter where I put "::" it outputs the whole line. I can't figure out what I'm doing wrong.
User avatar
Marko
Posts: 830
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jul 13th, ’18, 21:33

Sorry, currently Radio and CheckBox controls do not support description labels. We will add this functionality asap.
Post Reply