Dynamic form field not working? | Community
Skip to main content
July 24, 2013
Question

Dynamic form field not working?

  • July 24, 2013
  • 2 replies
  • 769 views
We have a form set up and using dynamic fields so that if a country (outside of US and Canada) is selected, they will NOT be required to select a state from the drop down, else that is a required field. A coworker set this up and I've never done dynamic forms... but below is the html used and for some reason this isn't working. Any input?

<
script type="text/javascript" src="/js/public/jquery-latest.min.js"></script>
<script type="text/javascript" src="/js/public/stateCountry.js"></script>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

July 24, 2013
In my experience of using this dynamic form option, I have found that it won't work correclty unless your Country and State field values are the same as the text files they originally give you in the .zip file that you download from this help article.
July 25, 2013
Kenny,

Thanks for your reply. We did use the zip file. I did take out the following html for the fancy button and now it works... any idea why this html would affect the dynamic fields?

----------------------------------------------------------------------------------------------------------------------------------------------------------

<script language="Javascript" src="/js/public/jquery-latest.min.js" type="text/javascript"></script>
   <script>
     var $jQ = jQuery.noConflict();
     // Use jQuery via $jQ(...)
     $jQ(document).ready(function(){
       $jQ("#mktFrmSubmit").wrap("<div class='buttonSubmit'></div>");
       $jQ(".buttonSubmit").prepend("<span></span>");
     });
   </script>
 
<style>
/* Start fancy button */
 
div.buttonSubmit {
  position:relative;
  float:left;}
 
div.buttonSubmit input, div.buttonSubmit span {
  background-image:url(imageURL);
  background-position:right 0px;
  background-repeat:no-repeat;
  border:0px none;
  color:#FFFFFF;
  cursor:pointer;
  float:left;
  font-weight:bold;
  height:36px;
  margin:0px;
  padding:0px 15px 2px;
  position:relative;
  z-index:5;}
 
div.buttonSubmit span {
  background-position:left -36px;
  left:-4px;
  padding:0px;
  position:absolute;
  top:0px;
  width:4px;
  z-index:10;}
 
div.buttonSubmit input {
  width:auto;
  padding-left: 10px !important;
  padding-right: 10px !important;}
 
#mktFrmSubmit{
    color: #FFFFFF !important;
    font-size: 13px;}
 
div.buttonSubmit:hover input {  background-position: right -72px;}
div.buttonSubmit:hover span {  background-position: left -108px;}
 
/* end fancy button */
 
div.buttonSubmit input, div.buttonSubmit span {
margin-top: 50px;}
< /style>