Crownpeak Input Controls Cheat Sheet

A cheat sheet in English by GregFinzer

Available Input Controls for Crownpeak

6,949 views 1,689 downloads 25 Sep 2018 History
3.7 avg · 0 ratings

Text Controls

Input.ShowTextBox("Text field", "text_field");
Input.ShowTextBox("Text area", "text_area", height: 5);
Input.ShowPassword("Password", "text_password");
Input.ShowWysiwyg("Compressed", "rich_compressed", ServicesInput.CompressedWYSIWYG());
Input.ShowWysiwyg("Medium", "rich_medium", ServicesInput.MediumWYSIWYG());
Input.ShowWysiwyg("Full", "rich_full", ServicesInput.FullWYSIWYG());

Dropdowns

var dropDownItems = new Dictionary<string,string>() 
	&nbsp;&nbsp;&nbsp;&nbsp;{ { "Select one", "" }, {  "Apples","apples" }, 
	&nbsp;&nbsp;&nbsp;&nbsp;{ "Grapes", "grapes" } };
Input.ShowDropDown("Single select", "dd_single", dropDownItems, Util.MakeList(""));
Input.ShowDropDown("Multiple select", "dd_multiple", dropDownItems, multiple: true);

Autoco­mplete

var completeOptions = new Dictionary<string, string>() 
	&nbsp;&nbsp;&nbsp;&nbsp;{ {"Visa", "visa"}, {"Mastercard", "mastercard"}}; 
Input.ShowAutoCompleteBox("Autocomplete box", "text_autocomplete", completeOptions, 
	&nbsp;&nbsp;&nbsp;&nbsp;helpMessage: "Credit Card Type", 
	&nbsp;&nbsp;&nbsp;&nbsp;popupMessage: "Try typing the letters V, or M");

Select List

var listItems = new Dictionary<string, string>() 
	&nbsp;&nbsp;&nbsp;&nbsp;{ { "One", "one" }, { "Two", "two" }};
Input.ShowSelectList("Categories", "categories", listItems);

Headers and Messages

Input.ShowHeader("Calendars");
Input.ShowMessage("Warning message", MessageType.Warning);
Input.ShowMessage("Basic message", MessageType.Basic);

Expand Panel

Input.StartExpandPanel("Title");
Input.ShowMessage("Input elements appear here");
Input.EndExpandPanel();

Checkboxes

Input.ShowCheckBox("", "is_red", "y", "Red");

Radio Buttons

var radioItems = new Dictionary<string, string>() 
	&nbsp;&nbsp;&nbsp;&nbsp;{ { "One", "one" }, 
	&nbsp;&nbsp;&nbsp;&nbsp;{ "Two", "two"  } };
Input.ShowRadioButton("Exclusive options", "options", 
	&nbsp;&nbsp;&nbsp;&nbsp;radioItems);

Calendars

Input.ShowSelectDate("Date", "date_field");
Input.ShowSelectDate("Multiple Dates", "dates_field", multiple: true);
Input.ShowSelectDate("Date Range", "date_range_field", range: true);
Input.ShowSelectDateTime("Date Time", "datetime_field");
Input.ShowSelectDateTime("Date Time (24h)", "datetime_24h_field", use24Hour: true);

Pickers

var noUpload = new ShowAcquireParams();
noUpload.ShowUpload = false;
Input.ShowAcquireDocument("Asset reference", "ref_asset");
Input.ShowAcquireImage("Image reference", "ref_image");
Input.ShowAcquireImage("Image reference (browse-only)", "ref_image_browse", noUpload);

Tabbed Panel

Input.StartTabbedPanel("Panel 1", "Panel 2");
//This is Panel 1
Input.NextTabbedPanel();
//This is Panel 2
Input.EndTabbedPanel();

Badges

Nice Cheat Sheet

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.