Skip to content

Frequently Asked Questions

Shane F. Carr edited this page Oct 29, 2019 · 1 revision

How do you use the dropdown menus?

Q: I see other people using dropdown menus in the card table. How do I make my own dropdown menus?

A: To create a dropdown menu:

  1. Go to Properties → Fields → Add Field
  2. Enter a name, like "my_dropdown"
  3. Choose Display → "dropdown"
  4. Enter the options under Dropdown Options

To use the dropdown menu in your template, it works like any other field. For example, you can use it as text (display the dropdown option text verbatim), or you can use it in an "if" statement for customization.

You can use Unicode Emoji in your dropdown menu choices if you like, although you can't put arbitrary images as options. However, you could use the selected option to choose an image to display in your template.

For example, if your dropdown options were "apple" and "orange", you could put this in your template:

if my_dropdown == "apple"
  // show an image of an apple

if my_dropdown == "orange"
  // show an image of an orange

For another example of dropdown menus, see this tutorial:

http://cardcreatr.shane.guru/general/2018/06/03/ruby-hunters/

How do you add a custom font?

Q: I have a font I would like to use, but it is not in Google Fonts. How do I add it?

A: You are able to add a custom ttf file. Follow the following steps:

  1. Go to the "Assets" tab. Under "Add File", choose your ttf file. You should see it added under assets. For example: assets/Ranga-Regular.ttf
  2. Go to the "Advanced" tab. Add the code shown below. Replace fontname with the name you want to use for the font, and assets/RanglaRegular.ttf with the path to your ttf file.
  3. In your Template, refer to the font using the name you put in the Advanced tab.

Code for the Advanced tab:

fonts: {
  "fontname (font)": "assets/Ranga-Regular.ttf"
},

Can you force a line break within a field?

Q: I'm trying to force a line break within a field, is this possible? I only know a little code, and I tried both <br> and \n within the field text and neither work.

A: Go to the "Fields" tab, choose the field you want to change, and under "Display", choose "multiline". Now you can enter line breaks directly in the spreadsheet text box. More info on text layout is in the blog:

https://cardcreatr.sffc.xyz/general/2018/04/15/building-blocks/#body-text