Customizing Modal box

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
shkdxb
Veteran Member
Posts: 40
Joined: 2013-06-28 18:18

Customizing Modal box

Post by shkdxb » 2014-06-20 05:22

trying to customize the modal box messages, no idea where the error messages are customized.

i want to show a popup message when start date is greater than end date. inserted the below code in file common.js.php under function Tablename_validateData() by
coping one of the existing error message code and pasted and changed the field names, but the popup message is not showing "the start date is greater than end date" as message but shows the copied source error

Code: Select all

if($('Callreceived_date').value >= $('CallResponded_date').value)
	{ modal_window({ message: '<div class="alert alert-danger"><?php echo addslashes($Translation['field not null']); ?></div>', title: "<?php echo addslashes($Translation['error:']); ?> Problem Related", close: function(){ jQuery('#Callreceived_date').focus(); } }); return false; };
how can i customize the message?

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Customizing Modal box

Post by a.gneady » 2014-06-22 03:30

Try this:

Code: Select all

if($('Callreceived_date').value >= $('CallResponded_date').value)
   { modal_window({ message: '<div class="alert alert-danger">the start date is greater than end date</div>', title: "<?php echo addslashes($Translation['error:']); ?> Problem Related", close: function(){ jQuery('#Callreceived_date').focus(); } }); return false; };
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

shkdxb
Veteran Member
Posts: 40
Joined: 2013-06-28 18:18

Re: Customizing Modal box

Post by shkdxb » 2014-06-23 02:53

this works but
1. the title is still shows as "Problem related". how to change this
2. The focus is not on end date filed after the modal box removed
3. This error shows up whenever i try to save the record, even when the date are correct.

shkdxb
Veteran Member
Posts: 40
Joined: 2013-06-28 18:18

Re: Customizing Modal box

Post by shkdxb » 2014-06-29 03:21

anyone help pl.

Post Reply