s
Contact Login Register
h M

Data Springs Modules Community Questions & Answers

Optionally make a textbox read only with DF?

I have a detailed form that records a person's name and a bunch of details about them. This form is used to both add new people and edit existing ones. I want to prevent people from opening a person's record and change their name to someone else's name.So the name field needs to be available in add mode but read only when in update mode. How would I accomplish that?

asked 3/30/2015
Mark Buelsing159
Mark Buelsing
  • HI Mark, how are you updating? Do you have a querystring that signals that the page is in edit mode? if so, you could hide the name fields and show an equivalent read-only name field with question event that triggers on update.

    david to - Chad Nash 3/31/2015

  • I could add a parameter to the querystring for this purpose. Yeah. How do you trigger a question event on form update? or in this case, form open I think. - Mark Buelsing 3/31/2015

  • HI Mark, make the querystring on update something like:

    http://www.yoursite.com/UserAdmin.aspx?Mode=update

    And create a hidden field called "Mode" that retrieves from querystring. Move it's sort order to the very top.

    Then create a question event based on the Mode = Update and if it is, hide the editable name field and display the read only name field.

    I hope this points you in the right direction.

    david to - Chad Nash 4/2/2015

  • I did not know that I could run a question event on open! I will be trying this technique this afternoon. Thanks! - Mark Buelsing 4/2/2015

  • You can but it has to be a hidden field.

    david to - Chad Nash 4/2/2015

1 Answer

This technique is a winner! Thanks David To!

answered 4/2/2015 Mark Buelsing 159
Mark Buelsing

Your Answer

In order to provide an answer to this question, you must Login

I am flagging this question because...

10 inform moderator flags remaining

I am deleting this question because...

I am flagging this answer because...

10 inform moderator flags remaining

Flagging a Post

You have already flagged this post. Clicking "Remove Flag" below will remove your flag, thus reducing the count by one as well.

I am deleting this answer because...

Looking for a DNN Module?

If you’ve used Data Springs modules before, you know how easy they are to install and use. We have built each individual module in our collection with integration in mind, so when you opt for Collection 7.0 you’ll be able to install our entire toolbox quickly and start putting it to work for your business today.Yes, in the blink of an eye you will arrive on the scene like a Superhero!

Data Springs has long been recognized as a leader in the DotNetNuke (DNN) community through hard work, integrity, and commitment. We’ve helped thousands of people POWER UP their website and our Collection 7.0 will do the same for you.

You deserve more than just an average website. You deserve a MACHINE!

Enter your email below AND grab your spot in our big giveaway!

The winner will receive the entire Data Springs Collection 7.0 - Designed to get your website up and running like a DNN superhero (spandex not included).

Subscribe