Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

Dynamically fill in a form?

Rate this topic:

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

AuthorMessages
chocolate
Posts:51



07/17/2007 8:12 AM  

Hi John. I've searched all over the Forums in both asp.net and dotnetnuke.com but couldn't find the answer.

Now, I'll explain what I'm trying to do.

Main purpose : letting users create their personalized pages without using a 3rd party module.

Approach :

        Now that DNN 4.5.x has the ability to assign a specific user to a page. However, it can only be done manually by the administrator. So if I show them to the Page creation form (which is possible), they'll have to fill in their usernames and this might create a lot of trouble. If the User field is disabled AND the current user's username is filled in automatically, the problem is solved! Can you tell me if there's any way to do this?

Thanks very much,
Duc


Pijaja.Com - Innovative Site Builder
John Mitchell
Posts:3085



07/17/2007 1:15 PM  
Hi Duc,
Are you saying that you can send a regular user to the add page form? And that they can actually create a new page?
It sounds like a security issue, but maybe you have found a way.

I could probably give you some server side code to stick in the .ascx file, but I'll need to know more about what form you are using to target the correct textbox.
chocolate
Posts:51



07/17/2007 9:32 PM  

Yes, it is possible through a trick.

First, I create a page which is viewed by a specific role. Next, create a Text/HTML module, grant edit permission to that role so the members in role can use the Control Panel. Then I edit the Text/HTML module, insert a button "Create your page now" and link it to : __doPostBack('TRTIconBar.ascx$cmdAddTab',''). I also have to hide (only hide) the CP in the page based on the corresponding role, so they do not see the CP but can still target it.

With this method, when a user registers, he's sent to the page, clicks the "Create Page" button in the Text/HTML module and is shown the Create Page form. The page he creates is limited to the child page of the parent page. When reached this stage, I meet these difficulties :

    1. Automatically assigned username for that page (of course the textbox is disabled)

    2. Change the default View permission to All Users.

    3. Limit the number of pages a user can create (this is the matter of the future but if you can help me with this, I'll be very appreciated)


Pijaja.Com - Innovative Site Builder
chocolate
Posts:51



07/19/2007 3:52 AM  

Argh, it seems that even if the username is filled in automatically, my problem is not solved because in order to make that user owner of the page, I also have to click "Add" and tick the edit box.

Anyway, as far as I understand, there IS a method to fill in a form like that, isn't it? Could you please check the Signup.ascx in admin/Portal and show me a way to fill the current username into the Username field as well as the email?

Thanks a thousand.
Duc


Pijaja.Com - Innovative Site Builder
John Mitchell
Posts:3085



07/20/2007 11:25 AM  
Ok, it sounds like now you want to add a new Portal though, is that your intention?
chocolate
Posts:51



07/20/2007 8:57 PM  

Yes, it is. My main purpose is to learn the way to insert default text into text boxes without touching the source code. There are some controls that I want to implement this, two of which are Creating Pages and Creating Portals. But recently, I realized that what I'm trying to do with the page creation is impossible, so I only need to know how to do it with the Portal Creation.

Please forgive me if I sound ambiguous. English is not my primary language though.

Best regards,
Duc


Pijaja.Com - Innovative Site Builder
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

Forums >DotNetNuke Support >General-DNN-Help > Dynamically fill in a form?



ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information