@@ -853,25 +853,112 @@ If it isn't, the block is not inserted
853
853
** Parameters** :
854
854
855
855
- Block reference pointing to the Form Configuration. The Form Configuration should be a tree
856
- - The root of the tree will be the form label
857
- - fields - a tree of fields to include in the form
858
- - name - the name of each field. When the form is submitted, this name is used for the output variable
859
- - type - The type of field. The following values are supported
860
- - text
861
- - number
862
- - select
863
- - page
864
- - block
865
- - flag
866
- - embed
867
- - label - The label describing the field to the user
868
- - default - The default value the field should have
869
- - output - what to do once the form is submitted. The supported values are:
856
+ - fields - a tree of fields to include in the form
857
+ - name - the name of each field. When the form is submitted, this name is used for the output variable
858
+ - type - The type of field. The following values are supported
859
+ - text
860
+ - number
861
+ - select
862
+ - page
870
863
- block
871
- - variables
872
- - submit - the text assigned to the submit button
873
- - cancel - the text assigned to the cancel button
874
- - The form config supports nested smartblock commands.
864
+ - flag
865
+ - embed
866
+ - autocomplete
867
+ - label - The label describing the field to the user
868
+ - default - The default value the field should have
869
+ - options - For ` select ` and ` autocomplete ` types, specifies the options available for selection.
870
+ - conditional - Specifies a field ` name ` that this field depends on to be displayed.
871
+ - conditionalValues - Specifies the values of the conditional field for which this field will be displayed.
872
+ - output - what to do once the form is submitted. The supported values are:
873
+ - block
874
+ - variables
875
+ - submit - the text assigned to the submit button
876
+ - cancel - the text assigned to the cancel button
877
+
878
+ \* The form config supports nested SmartBlock commands.
879
+
880
+ ** Example Form**
881
+
882
+ ```
883
+ - Example Form
884
+ - fields
885
+ - This is Some Text
886
+ - type
887
+ - text
888
+ - label
889
+ - Text Field
890
+ - This is a Number
891
+ - type
892
+ - number
893
+ - label
894
+ - Number Field
895
+ - Just a Label
896
+ - type
897
+ - label
898
+ - label
899
+ - Text Field
900
+ - Like a checkbox
901
+ - type
902
+ - flag
903
+ - label
904
+ - Flag Field
905
+ - This is text that is conditional on the checkbox
906
+ - type
907
+ - text
908
+ - label
909
+ - Conditional Text Field
910
+ - conditional
911
+ - Like a checkbox
912
+ - This searches all pages
913
+ - type
914
+ - page
915
+ - label
916
+ - Page Field
917
+ - This searches all blocks
918
+ - type
919
+ - block
920
+ - label
921
+ - Block Field
922
+ - This is a multiple choice
923
+ - type
924
+ - select
925
+ - label
926
+ - Select Field
927
+ - options
928
+ - apple
929
+ - banana
930
+ - orange
931
+ - conditional select 1
932
+ - This is a conditional text field based on the multiple choice
933
+ - type
934
+ - text
935
+ - label
936
+ - Conditional Text Field
937
+ - conditional
938
+ - This is a multiple choice
939
+ - conditionalValues
940
+ - conditional select 1
941
+ - orange
942
+ - This is an autocomplete field
943
+ - type
944
+ - autocomplete
945
+ - label
946
+ - Autocomplete Field
947
+ - options:
948
+ - apple
949
+ - banana
950
+ - orange
951
+ - This is like a roam block
952
+ - type
953
+ - embed
954
+ - label
955
+ - Embed Field
956
+ ```
957
+
958
+ ```
959
+ - Form #SmartBlock
960
+ - <%FORM:((S2MbRYozb))%>
961
+ ```
875
962
876
963
** Embed Default**
877
964
0 commit comments