Search
 

Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Tags

[userimage] 64 bit Active Forums Analytics ARB asp.net asp.net validation AuthARB Authorize.NET Back Button Basecamp Blog blog posts Browser Back Browser Close Browser History Browser Script cascading style sheet chip levinson client side validation Close Browser Close Window completion event content localization Count Timer Countdown CRM css csv Cursor customer feedback Data Data Springs data springs collection datasprings Date Time JavaScript Debug Info default value Demonstration DNN DNN Authentication DNN Blog DNN Core Profile Property dnn html module dnn modules dnn schedule error dnn schedule multiple dotnetnuke dotnetnuke 5.4.4 DotNetNuke Forums DotNetNuke Modules dotnetnuke reporting dotnetnuke scheduler dotnetnuke user image DropDown Login dynamic Dynamic Data dynamic fields dynamic forms dynamic forms silent post Dynamic Forms Tutorial Dynamic Login Dynamic PDF Form Completion Event dynamic registration dynamic registration silent post dynamic registration user image dynamic user directory dynamic views DynamicRegistration_Question DynamicRegistration_QuestionResponse email email issues Event Viewer Excel Export Export to Excel Facebook Facebook Connect Form Post Formatting Forms Forum Flow guides hidden field Highrise Highrise API HTTP Post Integration Interface iPAD iPAD App for Highrise iPAD Highrise App Items JavaScript Lead Generation LinkedIn list import Live Blog localization Login login module login skin object Mandeeps Microsoft Live Writer module configuration Modules oAuth2 Open Web Studio opt in email OWS Part 1 Part 2 payment gateway paypal Phone Number Products profile question fields Recurring Billing Redirect registration replace html text report views reports resource files resx Sales Force SalesForce Script Scripting server side validation Silent Post Single Sign On skin object Springs sql 2005 pivot sql default value sql import sql query sql replace statement sql reports SQL Server sql server 2005 SSL SSO stored procedure style sheet stylesheet success story Support technical techwise research test credit card numbers testimonial thumbnail image Time Timer Transaction TSQL T-SQL Tutorial Twitter Update Highrise user user directory user profile image users online Web Based writer writing xls xlsx XML

In the Flow

rss

Data Springs, Inc. - An online diary and web log from staff and customers for premium DotNetNuke resources, Data Springs Modules, and Data Springs Services.


Dynamic Forms and OpenWebStudio Integration Part 1 of 3

As a developer at Data Springs, you can imagine how many different software components we try out for our Development needs when creating solutions for clients. About 2 years ago I have found a Holy Grail development tool called OpenWebStudio(OWS). The more I work with this tool, the more I respect and invest into this development tool. For me it seems that there are endless possibilities with this module. I haven’t been let down yet. This blog post is a tutorial to getting started in OWS and integrating it with Dynamic Forms 4.0.

 

PREREQUISITES:

* Have an installation of DotNetNuke 5 or above.

* Download OpenWebStudio.

* Purchase Dynamic Forms or use a Dynamic Forms Trial version.

* Install OpenWebStudio and Dynamic Forms onto your DotNetNuke installation.

* Create 1 page, this page will contain a Dynamic Forms module instance and an OpenWebStudio module instance.

 

GOAL:

* Create a report off of a flat SQL table using OWS

 

SCENARIO:

* We need to build a form using Dynamic Forms to insert and update Books from flat table. This is going to end up being an Admin control.

 

GETTING STARTED ON PART 1 OF THIS TUTORIAL

You will need to go to Host-> SQL and create this table.

-------------------

Create Table DynamicForms_LibraryBooks

(

BookID int identity(1,1),

BookName nvarchar(200),

BookDesc nvarchar(2000),

BookCategory nvarchar(200),

DateAdded datetime

)

-------------------

 

Now that you have created this table, we can get started with the first part.

 

Step 1

You should have a page with a Dynamic Forms instance placed on it. Now you will need to add the following fields to the Dynamic Form:

Question Name Short Field Name Question Type Default Value Special Features
DSParam1 DSParam1 Hidden Field none Retrieve values from Querystring variable for this question
DBUpdate DBUPdate Hidden Field False Retrieve values from Querystring variable for this question
Book Name BookName Text Box none none
Book Desc BookDesc Multi Lined Text Box none Field width 200px, field height 100px
Book Category BookCategory Text Box none none

 

Here is an image of the layout:

 

FireShot capture #265 - 'OPENWEBSTUDIOTUTORIAL' - www_datasprings_com_openwebstudiotutorial

Now we must create a SQL Form Completion Event that will insert into the SQL Flat Table that we have created. Go to Form Completion Events and add a new Form Completion Event as the type Dynamic SQL Statement. This Completion Event must fire conditionally based on the value of the DBUpdate field. In order for this Form Completion to Execute we will only fire this event when DBUpdate = False. Now we need to build the insert statement. The insert statement will look very similar to the following script.

----------------------------------------------------

Insert into DynamicForms_LibraryBooks(BookName, BookDesc, BookCategory, DateAdded)

Values('$(BookName)', '$(BookDesc)', '$(BookCategory)', getDate())

--------------------------------------------------

The image below depicts the settings and such that the Dynamic SQL Statement should contain.

FireShot capture #266 - 'OPENWEBSTUDIOTUTORIAL' - www_datasprings_com_openwebstudiotutorial_ctl_edit_mid_2338_questionid_440e50df-68cf-4958-ac43-e793abf62bd4

 

Now you can insert into the DynamicForms_LibraryBooks flat table when you fill out and submit the form. So this Dynamic Form has now achieved an Insert mode for entering records into our table.

 

Step 2

Now we will need to work on the Update mode of this Dynamic Form. So we will start by going to Module Configuration –> Advanced Coding Options –> Initial SQL Rendering/ Bind. The SQL query for this SQL bind will be like the SQL query below:

---------------------------------------------------------

Select BookName, BookDesc, BookCategory from DynamicForms_LibraryBooks where BookID = '$(DSParam1)'

---------------------------------------------------------

Take a look at the settings in the image below:

FireShot capture #267 - 'OPENWEBSTUDIOTUTORIAL' - www_datasprings_com_openwebstudiotutorial_ctl_edit_mid_2338_questionid_440e50df-68cf-4958-ac43-e793abf62bd4

 

Update Settings after configuring these settings for Initial SQL Binding.

 

Now we will need to create another SQL Form Completion Event to account for the Update Mode of the Dynamic Form.

Go to Form Completion Events and add a Dynamic SQL Statement event. This event will need to Execute when DBUpdate = True.

The SQL will look like the following below:

---------------------------------------------------------

Update DynamicForms_LibraryBooks Set BookName = '$(BookName)', BookDesc = '$(BookDesc)', BookCategory = '$(BookCategory)', DateAdded = getDate() where BookID = '$(DSParam1)'

---------------------------------------------------------

The image below depicts the settings for this form completion event:

FireShot capture #268 - 'OPENWEBSTUDIOTUTORIAL' - www_datasprings_com_openwebstudiotutorial_ctl_edit_mid_2338_initial_dynamicformseventsdiv

 

Now our Insert and Update Mode are completed, the next part will be to get an OWS grid to integrate with the work that we have achieved so far.

This concludes part 1 of 3 in this Tutorial. Tutorial Part 2 will be published by Feb 21, 2012.

 

If you have any questions please leave a comment. Also please let me know if you’re interested in a particular example.

 

Thanks,

Ryan











   



Showing 0 Comment
 
 

Join our mailing list...

Get current news and events the easy way

 

 

   
Subscribe Me

Recent Blogs...

 
Copyright 2005 - 2011 by Data Springs, Inc.