In this article, Part 4 of our series on validation with K2 SmartForms, we will be looking at server side validation. There are a few options available and the method below is by no means the only way to achieve server side validation, but it should suffice for the most common server side validation requirements.
Let first recall our sample application and just revisit what we are trying to accomplish. The client side interface of our demo application looks as follows:
Last week we gave you a brief introduction to the world of K2 Workflows by showing you how to create a new K2 Workflow project in Visual Studio 2013.
Now that we have an empty K2 Workflow project to work with, we can start to create the workflow.
A K2 Workflow consists of components dragged and dropped from the Toolbox onto the Designer and then connected with lines that indicate the flow. In this blog we’ll discuss one of these components: the Default Client Event.
In the latest version of K2 SmartForms (v4.6.9), there has been quite a few changes. New conditions and actions have been added, layout changes to the rule configuration have been made and you now have the ability to add comments to your rules.
K2 SmartForms is a quick and easy way to create powerful interfaces that can provide great functionality to users in a short amount of time. However, even with the rules and expressions built directly into the K2 SmartForms, they are considered fairly static. It is through the use of the K2 Workflow that introduce behaviour for these forms. Through the K2 Workflow we can define the flow of a system, create activities to be completed, and specify an organisational structure of events that influences and manages the order in which things happen throughout a system.
In this new series on the K2 Workflow, I will start off by simply showing you how to create a new K2 Workflow project in Visual Studio 2013 and take you through some of the basic UI elements.
When sending data from a K2 SmartForm view on one form to a ViewMethod on another form, you can either send the data across in a query string and execute the ViewMethod once the new form initializes, or you can do it all with one rule while at the same time removing the need for a query string.
First we have an event that kicks off the process. When this button is clicked it takes data from the current view and uses it as input parameters for a ViewMethod of a different View on a different Form.
1 – K2 SmartForms – Data transfer between forms – Event configuration
Building K2 SmartForms is usually very easy and straight forward. One of the simplest controls to use is the radio button. While the radio button works in the exact same way as the standard HTML radio button, grouping radio buttons together works slightly different. In this blog I will show you how to use multiple radio buttons, and then show you how to group radio buttons together.
First, I need to add radio buttons to a K2 SmartForm. This step is as simple as selecting the radio button control from the tool box and dragging it onto the K2 SmartForm.
This is the 3rd part of a short series of articles on validation with K2 SmartForms. In the previous article, Part 2, we looked at simple client side validation using the built in validation functionality provided by K2 SmartForms. This article will build on the base we established there and take it a little further to address more complex requirements. To recap, lets have a quick look at our example form again.
Image 1 – Complex Client Side Validation – Example form