Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Disable an input field for the user for a specific page that contains any strings
- /* This below code will run on the WPUF edit page, and it will disable the phone field on the edit page only like- https://ibb.co/nkpXMJ0 */
- jQuery(document).ready(function( $ ){
- // Your code in here
- if (window.location.href.indexOf("edit") > -1) {
- $( "#phone_107" ).prop( "disabled", true );
- $(document).on('click',function(e){
- if(e.target.id == "phone_107"){
- alert("You can't edit this field after submission.");
- }
- });
- }
- });
Add Comment
Please, Sign In to add comment