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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Create a form that posts data to an external placeCreate a form that posts data to an external place
Previous
 
Next
New Post
3/31/2012 2:56 PM
 

Hi All,

my client uses a third-party newsletter solution which generates the HTML code of a Form on which the users can subscribe themselves.

My problem is that this script contains JavaScript for data validation. Placing this in a HTML module it does not work. Can you please, give me some suggestions how could I make it work?

Why don't I use a DNN module that deals with Forms?

Because I could not find any in which 

  1. I can set the name tag for the particular Form field: <input type="text" name="f_3" /> 

  2. I can set the action URL in for the Form. 

Here is the form's script:

<form id="subscribe_form" method="post" action="http://[URL].hu/">

  <table border="0" cellspacing="0" cellpadding="4">

   <tr>

    <td align="right" width="50%">Name:<font color="red">*</font></td>

    <td width="50%">

     <input type="text" name="name" />

    </td>

   </tr>

   <tr>

    <td align="right">E-mail:<font color="red">*</font></td>

    <td>

     <input type="text" name="subscr" />

    </td>

   </tr>

   <tr>

    <td align="right">call sign:</td>

    <td>

     <input type="text" name="f_2" />

    </td>

   </tr>

   <tr>

    <td align="right">name of your firm:</td>

    <td>

     <input type="text" name="f_3" />

    </td>

   </tr>

   <tr>

    <td align="right">address:</td>

    <td>

     <input type="text" name="f_4" />

    </td>

   </tr>

   <tr>

    <td align="center" colspan="2"><input type="submit" name=sub value="Subscribe" onClick="if(!fvalidate_2('feliratkozo_form_2')) return false;" /></td>

   </tr>

 </table>

</form>

<!-- WebGalamb Hírlevélkód - form vége

     JavaScript ellenőrző kód eleje -->

<script type="text/javascript">function fvalidate_2(fname){var formx=document.getElementById(fname);var hiba='';var mregexp=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(!mregexp.test(formx.subscr.value)){hiba='* Hibás a megadott e-mail cím!';formx.subscr.focus();}if(!formx.name.value){hiba+=(hiba?"\n":'')+'* Nincs megadva a név!';formx.name.focus();}if(hiba) hiba); else return true;}</script>

<!-- JavaScript ellenőrző kód vége -->   


 
New Post
4/1/2012 4:28 AM
 
you may place the script in the module head text box in module settings.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/1/2012 7:36 AM
 

Unfortunately the issue still persist. Even if I put the whole script into the Header field OR if I paste only the JavaScript there.


 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Create a form that posts data to an external placeCreate a form that posts data to an external place


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