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!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

SQL Render does not fire Question Events
Last Post 02-04-2010 09:22 AM by Chad Nash. 12 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Robert TenneyUser is Offline
skipping stones
skipping stones
Posts:8
Avatar

--
11-08-2009 06:15 PM

    When using Initial SQl Rendering/Bind the question events I've used to show certain fields do not seem to be applied.

     

    I have seen this question in the forums a few times but none of the suggestions are working for me.  There have also been new versions released since the last post so I don't know if the responses are still valid.  I'm using DynamicForms 3.0.31 on DNN 5.1.4.

     

    My form has several fields hidden until forced visible by a question event.  Question events attached to a combo box are used to show the fields based on the value selected.  This all works fine during the initial entry.  If I use the built in function to view form results and click on the Edit link, the form opens fine and the correct fields are shown based on the values that were saved.

     

    However they do not work when I use SQL Binding.  I have followed demonstration #14 to save and load data from an external table.  This all works fine, except that the question events are not fired and fields that should be visible are not.  The form loads and the correct values are shown from the external table.  The combo box shows the value that should trigger the event, but the fields are still hidden.  If I temporarily change the combo box value and then change it back to the actual value, the fields are shown and the values from SQL are loaded correctly.

     

    Why are the question events applied when using the built in edit function but not when using SQL Rendering/Bind?  I'm sure I missed something but I don't know what step to take next.  I tried using the hidden field as suggested in previous posts but that didn't seem to help.

     

    Any suggestions would be appreciated.

     

    -Robert

     

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    11-08-2009 07:24 PM
    Hi, that's because on SQL binding, it loads what's stored in the SQL table. Question events do not get triggered on page load. The only way to get question events to fire on page load is to create extra hidden fields. Let's say you have a combobox with shortname called "test" and it is used to fire a question event and reveal some hidden questions.

    What you can do is also create another "Hidden Field" type, and use client side javascript to set this to "test" field. Then apply the question event to the "hidden field" instead. See if this method will achieve what you are looking for. -- David
    Robert TenneyUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    11-08-2009 08:59 PM

    I tried that method and couldn't get it to work.  I just wanted to make sure those were still valid instructions before I spent more time on it.  I'll try again tomorrow.

     

    Why is it that it sets the visiblity correctly when using the built-in Edit but not the SQL Binding?  The form shouldn't care where it gets the data.  It should process it the same either way.  Is this an issue that is being looked at or is this how it is designed to handle this situation?

     

    Thanks for the response.

     

    Robert

     

    Robert TenneyUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    11-08-2009 10:13 PM
    It's still not working.

    I created a hidden field. I added a client-side script to set the value of the hidden field when the combo box changes. I have verified that this is working and the hidden field is being set correctly. I added a textbox field for testing and when I set the value of the hidden field, I also set the value of my test field to the value of the hidden field. $(Field1Hidden)=$(Field1); $(Field1Test)=$(Field1Hidden). My test field shows the correct value.

    I changed my question events to be based on my hidden field. I have five events that are looking for a specific value and one event for testing that fires on any response. None of these events are firing even though the hidden field value is changing.

    One success: I changed my initial sql query to add a field so my hidden field will bind directly to the data. When I do this, the events fire and the correct fields become visible. But still none of the events fire after that so the visible fields cannot be changed.

    What would cause the events to not fire even though the hidden field is changing?
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    11-09-2009 04:19 AM
    Hi, did you also place the javascript under Module configuration / Initial Javascript because this will trigger on page load and does't require a page refresh since you are binding on page load. Add this in and see if it works. -- David
    Robert TenneyUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    11-09-2009 04:57 AM
    Yes, I added the javascript to both the module and the combobox. Both scripts are setting the value correctly but neither one causes the events to be fired. After changing the value I would expect to see the Ajax status panel or some type of postback indicator but nothing happens.

    I have also set the sequence of the hidden field to 1 to ensure it is on the form before the fields I am trying to show. Another user said this worked for him but does not seem to help me.
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    11-09-2009 06:11 AM
    Hi, now that I've thought about this more, I don't believe question events will trigger on SQL binding. The only way to cause question events to trigger on page load is through a hidden field that retrieves it's value from querystring variable and not SQL binding. Chad Nash may have more insight into why this is so. -- David
    Robert TenneyUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    11-09-2009 11:43 AM

    I was able to populate the hidden field directly from the database using SQL binding (not set by script) and the events were fired and visiblilty applied correctly. So it seems the values do not have to come from a query string, but they do have to come from a source other than client side script. It is only when the value is set by javascript that the events do not fire.

    So we've learned that question events based on hidden fields will only fire on the server side prior to loading. Hidden field values must come from a stored data source. Hidden fields do not fire events during user interaction even when their values have changed.

    In that case I will need two sets of identical question events. One based on the hidden field to apply the rules during binding. And a second set of rules based on the combo box that will fire during user interaction.

    I will test this tonight and let you know how it goes. Thank you.

    Robert

     

    Robert TenneyUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    11-09-2009 10:59 PM
    The duplicate events didn't work because they override each other and too many fields are made visible. I am out of ideas at this point.

    I would still like to know the difference between using the built-in edit and SQL binding. When I click on the edit link from the built-in view form results page, the page loads up and the correct fields are visible. The user interacts with the form and it behaves as expected. However when I use SQL binding, the fields are all hidden and I have to reselect some combo box values to make them applicable fields visible. Why does it matter if the values are pulled from your table or mine? Why do I have to use hidden fields to make it happen but you don't?

    Perhaps Chad can shed some light on the subject.

    Robert
    Robert TenneyUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    11-11-2009 07:49 PM

    Hello Chad?

    David thought you might have an answer on this one. I could really use some help.

    Robert
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    11-12-2009 04:45 AM
    HI, Chad is in Las Vegas for the OpenForce convention all week and so he won't be able to answer this question until perhaps next week. -- David
    mrdevUser is Offline
    going with the flow
    going with the flow
    Posts:30
    Avatar

    --
    02-03-2010 02:37 AM

    Hello David,

    Is this issue resolved? On the similar lines, we have a hidden field(DSParam2) which retrieves value from session. This is used in question event to disable/hide a text box. This doesn't seem to work either.

    Thanks,

    Dev

     

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    02-04-2010 09:22 AM
    Hi guys,

    The best way to test and check this out is to setup a quick and basic demo of what you are trying to do at www.betasprings.com. I know that it works when its based on another property such as a query/session variable or loaded by default but I am not directly sure if it works with either a SQL Default or SQL Binding. If you setup a quick demo at betasprins.com (login as host/dnnhost) and let us know the URL we will be able to verify and see if this works in the latest version and/or if enhancements need to be enabled to function with SQL Binding and question events.


    Dev - As far as your quession... Keep in mind that DSParam1 thru 3 are only valid for querystring variables. DSSession1 thru 3 are valid for session variables. I do know we have used this on implementations so this should work.


    -Chad
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi