HomeHomeCoreCoreGeneralGeneralAnyone have a working TEXTEDITOR example for DNN 7?Anyone have a working TEXTEDITOR example for DNN 7?
New Post
10/21/2015 12:54 PM
Thanks for responding to this. 
The current form has a couple of complications: At the top of the form are three drop-down select boxes, the selections in the the second one are determined by the choice made in the first one.  I was using LxFetch (Now ows.fetch, I understand)  triggered by the onChange event in the first select box.  The problem that I have been fighting is that it resets the whole form, I lose all my values in the text boxes, which is usually OK when adding a new record, (assuming the user is making the selections before entering anything in the text boxes)  but really plays havoc when editing.  In the one above, the List view of the records is on a different page than the "edit" and "add" views and that worked pretty well.  (That is, until recently)

I was trying to get around sending the user to another page, and combined the functionality so that it is all in one module, which also works well (no text boxes added yet) until ows.fetch is triggered, then the module completely reloads reverting reverts to the list mode.  I have been trying to structure a work around that, but no luck yet.
New Post
10/22/2015 5:24 AM

Put your second dropdown in its own DIV

Then when you call ows.fetch get the result to be rendered in that div. 

Something like this

<select name="dropdown1" id="dropdown1" onclick="ows.Fetch([MODULEID,System],-1,'A=D1&V='+$(this).val(),'Select2goeshere');

"><option value="0">0</option><option value="100">100</option></select>

<div id="Select2goeshere"></div>

In OWS check for '[A,Querystring]'='D1' and have a Template that only return the html code for the next dropdown

Sorry this is quick and dirty response as I am not at my main computer. If you need I send you a demo configuration later


New Post
10/22/2015 2:23 PM
DNNHost:  Thanks for the pointer to Select 2.  It looks interesting, but another learning curve that I'm not ready for just yet.  I did not see anything in the documentation re: dependent or cascading drop-down selects.  I also ran across a whole library of jQuery plug-ins that look interesting, but with some possible license restrictions. looks like it is worth checking out.
New Post
10/22/2015 3:03 PM


Thanks for the response.  Although, I dont totally understand all the parameters on the example you posted. It was the first thing I saw when I awoke this morning after trying to digest the ows.fetch page on the WIKI at 2 am.  (I did some editing to the WIKI entry in an attempt to make it a bit more readable)

 I did not have the fourth parameter in my ows.Fetch call.  When I include one, it doesn't seem to make any difference.  I tried using the id of both the surrounding div ('dd2') and of the select tag ('frmMatID'), with either of them the second select box behaves correctly, but as soon as the onChange event fires, the editor disappears from all the textareas in the form. 

I have, for now, tried to configure it using TinyMCE following the directions on their website.  I placed the requisite script links in the page header  and when the form initially loads, each text area has a TinyMCE WYSIWYG editor.  As soon as a selection is made in the first drop-down, (I have the same issue, regardless of what editor I try to use.  I have also found that if I check 'enable Ajax Interaction' in the General tab, TinyMCE never loads.

 I am guessing that I may not be loading the scripts at the corrrect point, but am lost as to how to do this (Been pounding on this rock for over a week now)


 Here is relevant code:


<!-- Add a new FAQ : Default item - no results-->

<p>Add a new FAQ</p>
<div id="qForm">    
<div id="dropdowns" class="dropdown" >
<div id="dd1">
    <span class="dlabel">Industry:&nbsp;</span>
    <span class="ddown">
    <select id="frmCatID" name="frmCatID" onchange="lxFetch([*moduleid],0,'frmMatID');">
    <option value="">- 1. Select Industry --</option>
     {SUBQUERY, Name="qryCategory",
      Query="SELECT materialcat_id as cat_id,matcat_desc As cat FROM IRC_materialcategory ORDER BY cat",
      Format="<option value= '\[cat_id\]'>\[cat\]</option>",
      SelectedFormat="<option SELECTED value='\[cat_id\]'>\[cat\]</option>",
</div><!-- #dd1 -->

div id="dd2">
     <span class="dlabel">Material:</span>
     <span class="ddown">
     <select id="frmMatID" name="frmMatID" >   
      <option value="" >- 2. Select Material -</option>
       {SUBQUERY,  Name="qryMaterial",
       Query="SELECT [material_id] as [m_id]
       ,[material_name] as [material]
        FROM [IRC_material] Where [material_cat] = '[frmCatID,F]' ORDER BY material",
        Format="<option value= '\[m_id\]'>\[material\]</option>",
        SelectedFormat="<option SELECTED value='[m_id]'>[m_name]</option>",
</div><!-- #dd2 -->

<div id="dd3">

       <!-- A third Select Box - not relevant to the issue at this point -->

</div><!-- #dd3 -->
</div><!--#dropdowns  -->

<h2>TinyMCE Editor</h2>
<div class="questions" id="questions">
  <div id="q1" class="q">
    1. How is the material  used in this application?<br/>
    <textarea id="frmq1" name="frmq1"></textarea>
  </div><!-- #q1 -->

  <div id="q2" class="q">        
    2. How does this application perform using this material?<br/>
    <textarea id="frmq2" name="frmq2" ></textarea>
  </div><!-- #q2 -->    



       four more text areas 


 </div><!-- #questions -->
New Post
10/23/2015 3:54 AM

Hi Empulse,

I have created an example ows Configuration that shows exactly what you need. In my case I use the DNN Lists table to display a list of countries. When a country is selected the regions for that country are populated in the Regions select box

I have added a third input box into the demo. Whatever you enter in that box does not get removed when the Region select dropdown is refreshed. This is all done by using that 4th parameter. That parameter tells ows where to put the result, in this case inside the div named Selectdd2. If you do not include this parameter the whole area is refreshed.

Also look at the IF statement in the code. You can see that a different query template is performed if the A querystring parameter equals D1. This parameter is passed via the ows.Fetch call. You can amend the code to not even show the 2nd dropdown until the country is selected. 

This 4th parameter is very powerful. I use it at lot to populate a div which I then display in FancyBox. Like a popup login box or a popup edit box. 

I can't upload the configuration in the forum but you can get it from

Hope this helps


HomeHomeCoreCoreGeneralGeneralAnyone have a working TEXTEDITOR example for DNN 7?Anyone have a working TEXTEDITOR example for DNN 7?


New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA •

Bookmark & Share Bookmark and Share