Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryadditional fields on Repository upload / approvaladditional fields on Repository upload / approval
Previous
 
Next
New Post
9/1/2008 10:10 PM
 

you could add a javascript function to do that special validation. I would suggest placing it in the footer.html file of the template you are using.  That will result in the script being injected after the form has been displayed giving you access to the dynamic fields, and will also result in the script only being injected once.

 
New Post
9/2/2008 8:50 AM
 

Steve,

 

Thanks for bearing with me.  So I add the javascript to the footer.  But I can't figure out how to call.  Ideally, I'd like to call when the page is submitted (on the form or the Upload button).  If I can't do that, I'd at least like to do it as an 'onblur' on the field.

 

My other option would be to make a .net regular expression validator, but I can't see how to do that either.

 

If you could help, I'd really appreciate. 

 

But I don't see any way to do this.  Just having it at the bottom of the page won't make it execute on submit.

 
New Post
9/2/2008 1:54 PM
 

So I figured out how to add my javascript and get it to operate.  FYI, it doesn't go in the footer, as the footer isn't on the form page, so I added it on the form page of the appropriate template.

 

BUT I have a regular expression to validate the name.  AND DNN is removing anything in a bracket in my regular expression.

 

 

 

if (!theform.dnn$ctr574$form$__AuthorName.value.match(/^[a-z]+(\s[a-z]+){1,2}$/i)){

is becoming

 

if (!theform.dnn$ctr574$form$__AuthorName.value.match(/^+(\s+){1,2}$/i)){

Is there a special way to handle a regular expression?

 

 

 
New Post
9/2/2008 7:04 PM
 

I could really use a little additional assistance here.  I got my javascript to work, it validates that there are 3 names in the name field.   I had to put it in the form, because the FOOTER is not used on the upload page that I have (I don't know if I did something, but I don't think so).

 

But I still have 2 problems.  One is that when I click on UPLOAD from the first screen, it executes the ONSUBMIT script that I wrote for the form.  So I guess that both pages use this.  I think I can fix this by querying the URL and if it's the first screen, I'll bypass my check.

 

But my other problem is larger.  When the user submits the upload, if there are any validation issues from the standard Repository upload page, it shows those and also executes my validation.  BUT if it passes all the standard validation, it never executes my javascript.  How can I fix this?  Can I put my javascript somewhere else, e.g. include it in some validation that the module is doing?

 

I have spent most of the day exploring options and I'm not sure where to go from here.  I just need to have a first / middle and last name for the user.

 

Help would be appreciated.

 
New Post
9/2/2008 10:30 PM
 

I could really use a little additional assistance here.  I got my javascript to work, it validates that there are 3 names in the name field.   I had to put it in the form, because the FOOTER is not used on the upload page that I have (I don't know if I did something, but I don't think so).

 

But I still have 2 problems.  One is that when I click on UPLOAD from the first screen, it executes the ONSUBMIT script that I wrote for the form.  So I guess that both pages use this.  I think I can fix this by querying the URL and if it's the first screen, I'll bypass my check.

 

But my other problem is larger.  When the user submits the upload, if there are any validation issues from the standard Repository upload page, it shows those and also executes my validation.  BUT if it passes all the standard validation, it never executes my javascript.  How can I fix this?  Can I put my javascript somewhere else, e.g. include it in some validation that the module is doing?

 

I have spent most of the day exploring options and I'm not sure where to go from here.  I just need to have a first / middle and last name for the user.

 

Help would be appreciated.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryadditional fields on Repository upload / approvaladditional fields on Repository upload / approval


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out