jQWidgets Forums
jQuery UI Widgets › Forums › Plugins › Validator, Drag & Drop, Sortable › Validator tooltips do not follow dialog
Tagged: Validator Tooltips dialog
This topic contains 3 replies, has 2 voices, and was last updated by WildWill 10 years, 6 months ago.
-
Author
-
I have a dialog that appears with a form and the validator for it does NOT show all the tool tips and two of them are at the upper left corner of the screen, not by the form. Anyone have any ideas? I am not able to post a screen shot as far as I can tell. Basically we have string fields and a couple of password fields. The tooltips/validator messages do not show for the string fields. They password fields show, but are in the upper left hand corner of the web page.
Validator code:$("#createUser").jqxValidator({ rules: [ {input: "[name='username']", message: 'Username is required!', action: 'keyup, blur', rule: 'required'}, {input: "[name='username']", message: 'Your username must be between 4 and 50 characters!', action: 'keyup, blur', rule: 'length=4,50'}, {input: "[name='email']", message: 'E-mail is required!', action: 'keyup, blur', rule: 'required'}, {input: "[name='email']", message: 'Invalid e-mail!', action: 'keyup', rule: 'email'}, {input: "[name='display_name']", message: 'Display (Real) Name is required!', action: 'keyup, blur', rule: 'required'}, {input: "[name='display_name']", message: 'Your real name must not contain numbers!', action: 'keyup', rule: 'notNumber'}, {input: "[name='newPassword']", message: 'Password is required!', action: 'keyup, blur', rule: 'required'}, {input: "[name='newPassword']", message: 'Your password must be between 6 and 16 characters!', action: 'keyup, blur', rule: 'length=6,16'}, {input: "[name='newPasswordVerify']", message: 'Password is required!', action: 'keyup, blur', rule: 'required'}, {input: "[name='newPasswordVerify']", message: 'Passwords don\'t match!', action: 'keyup, focus', rule: function (input, commit) { if (input.val() === $("[name='newPassword']").val()) { return true; } return false; } } ] });
form code:
if ($('.createNew').length > 0){ $('.createNew').click(function(){ if ($(this).attr('id') == 'createUser'){ $("[name='user_id']").val(""); $("[name='username']").val(""); $("[name='email']").val(""); $("[name='display_name']").val(""); $("[name='inventory_user_id']").select2("val", ""); $("[name='role_id']").select2("val", ""); $(".userDisplay").html(""); $("#dialogWindow").jqxWindow('setTitle', "Create New User"); $(".formDiv").each(function(obj, i){ if ($(this).attr('id') == 'userCreateForm'){ $(this).css("display", "block"); } else { $(this).css("display", "none"); } }); } else if ($(this).attr('id') == 'createManualMap'){ $("[name='mapLocationIdHidden']").val(""); $("[name='mapUserIdHidden']").val(""); $("[name='mapUserId']").select2("val", ""); $(".manualMapDisplay").html(""); $("#dialogWindow").jqxWindow('setTitle', "Create New Location/User Map"); $(".formDiv").each(function(obj, i){ if ($(this).attr('id') == 'manualMapCreateForm'){ $(this).css("display", "block"); } else { $(this).css("display", "none"); } }); // remove rows added by last instance of this popup form $("#manualMapCreateForm .cloned-row").remove(); } else if ($(this).attr('id') == 'createSwitch'){ $("[name='locationDescriptionHidden']").val(""); $("[name='clli']").val(""); $("[name='siterraSwitchName']").select2("val", ""); $(".switchDisplay").html(""); $("#dialogWindow").jqxWindow('setTitle', "Create New Switch Map"); $(".formDiv").each(function(obj, i){ if ($(this).attr('id') == 'switchNameCreateForm'){ $(this).css("display", "block"); } else { $(this).css("display", "none"); } }); // remove rows added by last instance of this popup form $("#switchNameCreateForm .cloned-row").remove(); } else if ($(this).attr('id') == 'createSpareLocation'){ $("[name='spareLocationIdHidden']").val(""); $("[name='spareLocationType'][value=Cell]").attr('checked', 'checked'); $(".spareLocationDisplay").html(""); $("#dialogWindow").jqxWindow('setTitle', "Create New Spare Location"); $(".formDiv").each(function(obj, i){ if ($(this).attr('id') == 'spareLocationCreateForm'){ $(this).css("display", "block"); } else { $(this).css("display", "none"); } }); // remove rows added by last instance of this popup form $("#spareLocationCreateForm .cloned-row").remove(); } $("#dialogWindow").jqxWindow('open'); var formHeight = $(".formDiv").height() + 125; // for smaller viewports - make sure new window isn't too big! if (formHeight > $(window).height() ) { formHeight = $(window).height() - 50; } $("#dialogWindow").jqxWindow({height: formHeight}); }); }
I forgot to add. The dialog is created hidden and only exposed when needed.
Hi WildWill,
If you mean that when you move your dialog, the tooltips should move with it – this will not happen. If you want to display validator tooltips in dialogs, you’d better use them with this mode: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxvalidator/validation-label.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comPeter,
No, that is not the issue I was having. I managed to solve that one. I am going to put in a new post for my problem now.
-
AuthorPosts
You must be logged in to reply to this topic.