disable fields after insert

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
angus
Veteran Member
Posts: 109
Joined: 2020-05-28 22:27

disable fields after insert

Post by angus » 2022-08-11 11:02

Hi I want to disable fields after the record is created, so only on the update screen
this does not seem to work, is there an easier way to do this?

Code: Select all

function testTable1_footer($contentType, $memberInfo, &$args) {
		$footer='';

		switch($contentType) {
			case 'tableview':
				$footer='';
				break;

			case 'detailview':
				$footer="<%%FOOTER%%><script>
										$j('#update').click(function(){
											\$j('#Contract-container').prop('readonly','true');
											\$j('#Name-container').prop('readonly','true');
										});
									</script>";
				break;

if I use this below it works, but also disables on insert too which is no good for me

Code: Select all

function testTable1_footer($contentType, $memberInfo, &$args) {
		$footer='';

		switch($contentType) {
			case 'tableview':
				$footer='';
				break;

			case 'detailview':
				$footer="<%%FOOTER%%><script>
										       \$j('#Contract-container').prop('readonly','true');
											\$j('#Name-container').prop('readonly','true');
									</script>";
				break;
AppGini 22.13

angus
Veteran Member
Posts: 109
Joined: 2020-05-28 22:27

Re: disable fields after insert

Post by angus » 2022-08-11 11:41

I found this on the forum - viewtopic.php?t=3111

I have managed to get this to work for me using this thread. thanks
AppGini 22.13

Post Reply