Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
protogrid:create-button [2018-03-02 10:03] druprotogrid:create-button [2021-10-15 14:13] (current) – old revision restored (2018-03-02 10:26) dru
Line 1: Line 1:
-====== Create Button ======+====== Button to Create New Cards ======
  
 This article explains how to add own buttons which create new [[protogrid:card|Cards]] to an [[protogrid:overview card|Overview Card]] (e.g. the [[protogrid:default card|Default Card]]). This article explains how to add own buttons which create new [[protogrid:card|Cards]] to an [[protogrid:overview card|Overview Card]] (e.g. the [[protogrid:default card|Default Card]]).
Line 17: Line 17:
  
  
-This code snippet generates a new Card ID. Next you need to add the code which actually creates your Card. For this, you need to know the key of the proto which you want your card to be based on (see [[protogrid:proto | Proto]]).+This code snippet generates a new Card ID. Next you need to add the code which actually creates your Card. For this, you need to know the key of the [[protogrid:proto | Proto]] which you want your card to be based on.
 Now you can add the following code snippet below the one above, replacing "my_proto_key" with the key of your Proto. Now you can add the following code snippet below the one above, replacing "my_proto_key" with the key of your Proto.
  
Line 31: Line 31:
 create_product(); create_product();
 </code> </code>
-As the last step, add a button to the [[protogrid:proto|Proto]] you like. Select your Trigger and type in a suitable label for the button.  +As last step, add a button to the [[protogrid:Proto#Overview Proto|Overview Proto]] of the card you want the button to be placed on. Select your Trigger and type in a suitable label for the button which describes its action to the user
- +
-That's it, clicking onto this Button will immediately create and open a new Card! +
  
 +That's it, clicking onto this button will immediately create and open a new Card!
  
  
Print/export