I have a query string that is passing values to LF Forms. I tested to make sure everything works by not making the fields read-only first. Once I verified the fields were being populated correctly, I made the fields read-only. Once I did that, the fields stopped being populated. How can I pass a value from a query string into a read-only field?
Question
Question
Populating Read-Only Field from Query String Does not Work
            
            asked on March 17, 2014
        
                                    
                                    
                                        0
                                    
                                        
                                            0
                                        
                                
                                                            Answer
                                
                                    
                                        
                                        APPROVED ANSWER
                                    
                                
                                                            
                                    
                                        
                                        SELECTED ANSWER
                                    
                                
                        
                                        
            
            replied on March 17, 2014
        
            
                •
                Show version history
            
If a field is set to read-only when design the form on Edit page, Forms don't allow passing value through URL to that field for security reasons. You can use JavaScript the set the fields as read-only instead if you do want to pass value through URL. For example, you can add a CSS class named "read-only" to the fields, then in JavaScript, you can use following script to set the fields as read-only:
$(document).ready(function(){  
  
  $(".read-only *").prop("readonly", true);
});
                                    
                                    
                                        0
                                    
                                        
                                            0