How do I move the Children's table position?

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

How do I move the Children's table position?

Post by nycwebmaster » 2020-04-17 18:11

Hi,

I had a long table that I applied the modification that AHMED has on the Udemy course (highly recommended) and was able to organize the form in tabs as you will see in the picture. The issue that I have is that since I applied the Tabs modification the children tables renders on the top of the detailed view instead of being at the bottom of the detailed view like others. Anyone have a quick and dirty solution to maintain the children table at the bottom?


Image

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1308
Joined: 2018-04-01 10:12

Re: How do I move the Children's table position?

Post by pböttcher » 2020-04-17 18:30

Hi,

are you using a combined TV + DV?

Shall the children table be shown below the DV or the TV?

nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

Re: How do I move the Children's table position?

Post by nycwebmaster » 2020-04-17 20:51

are you using a combined TV + DV?
Nope that is the detailed view
The children tables should be below.

nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

Re: How do I move the Children's table position?

Post by nycwebmaster » 2020-04-17 21:01

I'm not using combined

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1308
Joined: 2018-04-01 10:12

Re: How do I move the Children's table position?

Post by pböttcher » 2020-04-17 21:14

can you post the code you are using to create the tabs?

nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

Re: How do I move the Children's table position?

Post by nycwebmaster » 2020-04-20 20:09

Code: Select all


<?php
	// For help on using hooks, please refer to https://bigprof.com/appgini/help/working-with-generated-web-database-application/hooks

	function Profile_Registered_Nurse_init(&$options, $memberInfo, &$args){

		return TRUE;
	}

	function Profile_Registered_Nurse_header($contentType, $memberInfo, &$args){
		$header='';

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

			case 'detailview':
				$header='';
				break;

			case 'tableview+detailview':
				$header='';
				break;

			case 'print-tableview':
				$header='';
				break;

			case 'print-detailview':
				$header='';
				break;

			case 'filters':
				$header='';
				break;
		}

		return $header;
	}

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

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

			case 'detailview':
				$footer='';
				break;

			case 'tableview+detailview':
				$footer='';
				break;

			case 'print-tableview':
				$footer='';
				break;

			case 'print-detailview':
				$footer='';
				break;

			case 'filters':
				$footer='';
				break;
		}

		return $footer;
	}

	function Profile_Registered_Nurse_before_insert(&$data, $memberInfo, &$args){

		return TRUE;
	}

	function Profile_Registered_Nurse_after_insert($data, $memberInfo, &$args){
		
		$link = application_url('Profile_Registered_Nurse_view.php') . '?SelectedID=' . urlencode($data['selectedID']);
		sendmail([
   'to' => '[email protected]',
   'subject' => 'A new profile for Screener has been created',
   'message' => "<a href=\"{$link}\">View or edit this record here</a>"
]);
		
		
		
		
		
		
		
		
		
		

		return TRUE;
	}

	function Profile_Registered_Nurse_before_update(&$data, $memberInfo, &$args){

		return TRUE;
	}

	function Profile_Registered_Nurse_after_update($data, $memberInfo, &$args){
		
		
		$link = application_url('Profile_Registered_Nurse_view.php') . '?SelectedID=' . urlencode($data['selectedID']);
		sendmail([
   'to' => '[email protected]',
   'subject' => 'A new profile for Screener has been updated',
   'message' => "<a href=\"{$link}\">View or edit this record here</a>"
]);
		
		
		
		
		
		

		return TRUE;
	}

	function Profile_Registered_Nurse_before_delete($selectedID, &$skipChecks, $memberInfo, &$args){

		return TRUE;
	}

	function Profile_Registered_Nurse_after_delete($selectedID, $memberInfo, &$args){

	}

	function Profile_Registered_Nurse_dv($selectedID, $memberInfo, &$html, &$args){
		
				/* if this is the print preview, don't modify the detail view */
		if(isset($_REQUEST['dvprint_x'])) return;
		
		ob_start(); ?>
		
		<div id="form-tabs">
			<ul class="nav nav-tabs">
				<li class="active"><a href="#general-info" data-toggle="tab">General info</a></li>
				<li><a href="#files-info" data-toggle="tab">Files info</a></li>
				<li><a href="#certificates-info" data-toggle="tab">Certificates</a></li>
				<li><a href="#medical-info" data-toggle="tab">Medical</a></li>
				<li><a href="#availability-info" data-toggle="tab">Availability</a></li>
				<li><a href="#employment-info" data-toggle="tab">Current Employer</a></li>
				<li><a href="#previous-employer-info" data-toggle="tab">Past Employer</a></li>
				<li><a href="#education-info" data-toggle="tab">Education</a></li>
				<li><a href="#references-info" data-toggle="tab">References</a></li>
				<li><a href="#deposit-info" data-toggle="tab">Direct Deposit</a></li>
				<li><a href="#agreement-info" data-toggle="tab">Agreements</a></li>
			</ul>
			
			<ul class="tab-content">
				<div class="tab-pane active form-horizontal" id="general-info"></div>
				<div class="tab-pane form-horizontal" id="files-info"></div>
				<div class="tab-pane form-horizontal" id="certificates-info"></div>
				<div class="tab-pane form-horizontal" id="medical-info"></div>
				<div class="tab-pane form-horizontal" id="availability-info"></div>
				<div class="tab-pane form-horizontal" id="employment-info"></div>
				<div class="tab-pane form-horizontal" id="previous-employer-info"></div>
				<div class="tab-pane form-horizontal" id="education-info"></div>
				<div class="tab-pane form-horizontal" id="references-info"></div>
				<div class="tab-pane form-horizontal" id="deposit-info"></div>
				<div class="tab-pane form-horizontal" id="agreement-info"></div>
			</ul>
		</div>
		
		<style>
			#form-tabs .nav-tabs a{ display: block !important; }
		</style>
		
		<script>
			$j(function(){
				setTimeout(function() { $j('#form-tabs').appendTo('#general_dv_form'); }, 1000);
				
				/* fields to move to the general info tab */
				$j('#First_Name').parents('.form-group').appendTo('#general-info');
				$j('#Last_Name').parents('.form-group').appendTo('#general-info');
				$j('#Email').parents('.form-group').appendTo('#general-info');
				$j('#Cell_Phone').parents('.form-group').appendTo('#general-info');
				$j('#Home_Phone').parents('.form-group').appendTo('#general-info');
				$j('#Fax').parents('.form-group').appendTo('#general-info');

				$j('#Notes').parents('.form-group').appendTo('#general-info');
				$j('#User_Name').parents('.form-group').appendTo('#general-info');
				$j('#Address').parents('.form-group').appendTo('#general-info');
				$j('#City').parents('.form-group').appendTo('#general-info');
				$j('#State').parents('.form-group').appendTo('#general-info');
				$j('#Zip_Code').parents('.form-group').appendTo('#general-info');
				$j('#Screener_Position').parents('.form-group').appendTo('#general-info');	$j('#Other_Position').parents('.form-group').appendTo('#general-info');
				$j('#Date_Of_Birth').parents('.form-group').appendTo('#general-info');
				$j('#Are_You_US_Citizen').parents('.form-group').appendTo('#general-info');
				$j('#Able_To_Work').parents('.form-group').appendTo('#general-info');
				$j('#Own_Transportation').parents('.form-group').appendTo('#general-info');
				$j('#Glove_Size').parents('.form-group').appendTo('#general-info');
				$j('#Hiring_Manager').parents('.form-group').appendTo('#general-info');
				$j('#Other_Hiring_Manager').parents('.form-group').appendTo('#general-info');
				$j('#Hiring_Rate').parents('.form-group').appendTo('#general-info');
				$j('#Rate').parents('.form-group').appendTo('#general-info');
				
				
				/* fields to move to the files info tab */
				$j('#Instructions').parents('.form-group').appendTo('#files-info');
				$j('#W_9').parents('.form-group').appendTo('#files-info');
				$j('#Background_Check').parents('.form-group').appendTo('#files-info');
				$j('#Upload_W_9_Picture').parents('.form-group').appendTo('#files-info');
				$j('#Upload_W_9_PDF').parents('.form-group').appendTo('#files-info');
				$j('#Upload_Resume_Picture').parents('.form-group').appendTo('#files-info');
				$j('#PostalCode').parents('.form-group').appendTo('#files-info');
				$j('#Upload_Resume_PDF').parents('.form-group').appendTo('#files-info');
				$j('#Upload_Background_Check_Picture').parents('.form-group').appendTo('#files-info');
				$j('#Upload_Background_Check_PDF').parents('.form-group').appendTo('#files-info');
				
				
				/* fields to move to the certificates info tab */
				$j('#Certificate_Name_1').parents('.form-group').appendTo('#certificates-info');
				$j('#Expiration_Date_1').parents('.form-group').appendTo('#certificates-info');
				$j('#Certificate_PDF_1').parents('.form-group').appendTo('#certificates-info');
				$j('#Certificate_Picture_1').parents('.form-group').appendTo('#certificates-info');
				$j('#Certificate_Name_2').parents('.form-group').appendTo('#certificates-info');
				$j('#Expiration_Date_2').parents('.form-group').appendTo('#certificates-info');
				$j('#certificate_PDF_2').parents('.form-group').appendTo('#certificates-info');
				$j('#Certificate_Picture_2').parents('.form-group').appendTo('#certificates-info');
				$j('#Certificate_Name_3').parents('.form-group').appendTo('#certificates-info');
				$j('#Expiration_Date_3').parents('.form-group').appendTo('#certificates-info');
				$j('#Certificate_PDF_3').parents('.form-group').appendTo('#certificates-info');
				$j('#Certificate_Picture_3').parents('.form-group').appendTo('#certificates-info');
				
				/* fields to move to the medical info tab */
				$j('#Position').parents('.form-group').appendTo('#medical-info');
				$j('#Medical_Position').parents('.form-group').appendTo('#medical-info');
				$j('#RN_License_Number').parents('.form-group').appendTo('#medical-info');
				$j('#RN_Licence_State').parents('.form-group').appendTo('#medical-info');
				$j('#RN_Licence_Expiration_Date').parents('.form-group').appendTo('#medical-info');
				$j('#Years_Doing_Fingerstick').parents('.form-group').appendTo('#medical-info');
				$j('#Last_Time_Performed_Fingerstick').parents('.form-group').appendTo('#medical-info');
				$j('#Educated_In_OSHA').parents('.form-group').appendTo('#medical-info');
				$j('#Passed_The_OSHA_Certification').parents('.form-group').appendTo('#medical-info');
				$j('#Given_Flu_Shots').parents('.form-group').appendTo('#medical-info');
				$j('#Years_Experience_Flu_Shots').parents('.form-group').appendTo('#medical-info');
				$j('#Equipment_Experience').parents('.form-group').appendTo('#medical-info');
				$j('#Manual_Blood_Pressure').parents('.form-group').appendTo('#medical-info');
				$j('#Own_A_Large_Cuff').parents('.form-group').appendTo('#medical-info');
				$j('#Glucose_Testing_Equipment').parents('.form-group').appendTo('#medical-info');
				
				
				
				/* fields to move to the availability info tab */
				$j('#Availability').parents('.form-group').appendTo('#availability-info');
				$j('#Travel_60_More').parents('.form-group').appendTo('#availability-info');				$j('#Willing_To_Travel_60_Mile_Radius').parents('.form-group').appendTo('#availability-info');				
				
				/* fields to move to the employment info tab */
				$j('#List_All_Experiences').parents('.form-group').appendTo('#employment-info');
				$j('#Current_Employer').parents('.form-group').appendTo('#employment-info');
				$j('#Supervisor_Name').parents('.form-group').appendTo('#employment-info');
				$j('#Employer_Address').parents('.form-group').appendTo('#employment-info');
				$j('#Current_Employer_City').parents('.form-group').appendTo('#employment-info');
				$j('#Current_Employer_State').parents('.form-group').appendTo('#employment-info');
				$j('#Current_Employer_Zip_Code').parents('.form-group').appendTo('#employment-info');
				$j('#Current_Employer_Phone').parents('.form-group').appendTo('#employment-info');
				$j('#Positions').parents('.form-group').appendTo('#employment-info');
				$j('#Reason_For_Leaving').parents('.form-group').appendTo('#employment-info');
				$j('#Salary_Per_Hour_Or_Per_Event').parents('.form-group').appendTo('#employment-info');
				$j('#Current_Employer_Starting_Date').parents('.form-group').appendTo('#employment-info');
				$j('#Current_Employer_Ending_Date').parents('.form-group').appendTo('#employment-info');
				
				
				
				/* fields to move to the previous-employer info tab */

				$j('#Previous_Employer').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_Supervisor_Name').parents('.form-group').appendTo('#previous-employer-info');
				
				$j('#Previous_Employer_Address').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_City').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_State').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_Zip_Code').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_Phone').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_Positions').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_Leaving').parents('.form-group').appendTo('#previous-employer-info');
				
				
				$j('#Previous_Employer_Starting_Date').parents('.form-group').appendTo('#previous-employer-info');
				$j('#Previous_Employer_Ending_Date').parents('.form-group').appendTo('#previous-employer-info');
				
				
				/* fields to move to the education info tab */
				$j('#High_School_Graduated').parents('.form-group').appendTo('#education-info');
				$j('#High_School_Name').parents('.form-group').appendTo('#education-info');
				$j('#High_School_Graduated').parents('.form-group').appendTo('#education-info');
				$j('#High_School_City').parents('.form-group').appendTo('#education-info');
				$j('#High_School_State').parents('.form-group').appendTo('#education-info');
				$j('#College_Graduated').parents('.form-group').appendTo('#education-info');
				$j('#College_Name').parents('.form-group').appendTo('#education-info');
				$j('#College_State').parents('.form-group').appendTo('#education-info');
				$j('#College_City').parents('.form-group').appendTo('#education-info');				
				
				
				/* fields to move to the reference info tab */
				$j('#Reference_Name_1').parents('.form-group').appendTo('#references-info');
				$j('#Reference_Relationship_1').parents('.form-group').appendTo('#references-info');
				$j('#Reference_Phone_1').parents('.form-group').appendTo('#references-info');
				
				$j('#Reference_Name_2').parents('.form-group').appendTo('#references-info');
				$j('#Reference_Relationship_2').parents('.form-group').appendTo('#references-info');
				$j('#Reference_Phone_2').parents('.form-group').appendTo('#references-info');
				
				$j('#Reference_Name_3').parents('.form-group').appendTo('#references-info');
				$j('#Reference_Relationship_3').parents('.form-group').appendTo('#references-info');
				$j('#Reference_Phone_3').parents('.form-group').appendTo('#references-info');
				
				/* fields to move to the direct_deposit info tab */
				$j('#Direct_Deposit').parents('.form-group').appendTo('#deposit-info');
				$j('#Bank_Name').parents('.form-group').appendTo('#deposit-info');
				$j('#Amount').parents('.form-group').appendTo('#deposit-info');
				$j('#Bank_Address').parents('.form-group').appendTo('#deposit-info');
				$j('#Bank_City').parents('.form-group').appendTo('#deposit-info');
				$j('#Bank_State').parents('.form-group').appendTo('#deposit-info');
				$j('#Bank_Zip_Code').parents('.form-group').appendTo('#deposit-info');
				$j('#Account_Number').parents('.form-group').appendTo('#deposit-info');
				$j('#Routing_Number').parents('.form-group').appendTo('#deposit-info');
				$j('#Voided_Check_Picture').parents('.form-group').appendTo('#deposit-info');
				$j('#Voided_Check_PDF').parents('.form-group').appendTo('#deposit-info');
				$j('#Voided_Check_PDF').parents('.form-group').appendTo('#deposit-info');
				
				
				/* fields to move to the agreement info tab */
				$j('#Your_Electronic_Signature').parents('.form-group').appendTo('#agreement-info');
				$j('#Agreement_Date').parents('.form-group').appendTo('#agreement-info');
				$j('#Agree_To_Investigate').parents('.form-group').appendTo('#agreement-info');
				$j('#Global_Agreement_Picture').parents('.form-group').appendTo('#agreement-info');
				$j('#Global_Agreement_PDF').parents('.form-group').appendTo('#agreement-info');
				$j('#Agreement').parents('.form-group').appendTo('#agreement-info');
				$j('#Created_By').parents('.form-group').appendTo('#agreement-info');
				$j('#Created_On').parents('.form-group').appendTo('#agreement-info');
				$j('#Modified_By').parents('.form-group').appendTo('#agreement-info');
				$j('#Modified_On').parents('.form-group').appendTo('#agreement-info');
				$j('#IP_Address').parents('.form-group').appendTo('#agreement-info');
				
				
			})
		</script>
		
		<?php
		$tabs = ob_get_contents();
		ob_end_clean();
		
		$html .= $tabs;
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		

	}

	function Profile_Registered_Nurse_csv($query, $memberInfo, &$args){

		return $query;
	}
	function Profile_Registered_Nurse_batch_actions(&$args){

		return array();
	}









pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1308
Joined: 2018-04-01 10:12

Re: How do I move the Children's table position?

Post by pböttcher » 2020-04-20 21:07

Hi ,

can you try with

setTimeout(function() { $j('#form-tabs').prependTo('#general_dv_form').parent(); }, 1000);

instead of

setTimeout(function() { $j('#form-tabs').appendTo('#general_dv_form'); }, 1000);

nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

Re: How do I move the Children's table position?

Post by nycwebmaster » 2020-04-21 17:36

Hi,

Thanks but somehow did not worked, I even went to another browser suspecting that the cache still there but no, unfortunately didn't worked.

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1308
Joined: 2018-04-01 10:12

Re: How do I move the Children's table position?

Post by pböttcher » 2020-04-21 17:49

Hi,

are you using anything else to modify your DV appearance?

nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

Re: How do I move the Children's table position?

Post by nycwebmaster » 2020-04-21 19:21

This is the tablename-dv-js

Code: Select all


// file: patients-dv.js


/*
var dv = new AppGiniDetailView();
var actionbuttons = dv.actionbuttons;
var group = actionbuttons.addGroup("Screener Links");
group.addLink("Screener Dashboard", "dashboard-mffs-screener.php");

*/


var text = "<div><h1><strong>General Information</strong></h1><br><p><b>Enter your personal information then click on the next tab to continue. Click on the green Save New button to finish.</b></p><br></div>";
new AppGiniField("First_Name")
  .insertAbove()
    
    .p(text, "lead") // css classname "lead"
    ;



var text2 = "<div><h1><strong>Upload your files</strong></h1><br><p><b>Upload your W9 and Background Check. We need to have both forms uploaded to start your hiring process.</b></p><br> <div>Note that you can upload the file in either PDF format or you can take a picture from your phone. Please choose the corresponding file format for each field</div></div>";
new AppGiniField("Instructions")
  .insertAbove()
    
    .p(text2, "lead") // css classname "lead"
    ;


var text3 = "<div><h1>Certificates</h1><br><p>Upload any certificate related to your job application.</p><br></div>";
new AppGiniField("Certificate_Name_1")
  .insertAbove()
    
    .p(text3, "lead") // css classname "lead"
    ;



var text4 = "<div><h1>Medical Experience</h1><br><p>Please fill out IF applying for a medical position only.  Otherwise skip this tab.</p><br></div>";
new AppGiniField("Years_Doing_Fingerstick")
  .insertAbove()
    
    .p(text4, "lead") // css classname "lead"
    ;

var text5 = "<div><h1>Availability</h1><br><p>Tell us about your availability.</p><br></div>";
new AppGiniField("Availability")
  .insertAbove()
    
    .p(text5, "lead") // css classname "lead"
    ;

var text6 = "<div><h1>Current Employer</h1><br><p>Enter your current employer information.</p><br></div>";
new AppGiniField("List_All_Experiences")
  .insertAbove()
    
    .p(text6, "lead") // css classname "lead"
    ;


var text7 = "<div><h1>Past Employer</h1><br><p>Enter your past employer information.</p><br></div>";
new AppGiniField("Previous_Employer")
  .insertAbove()
    
    .p(text7, "lead") // css classname "lead"
    ;

var text8 = "<div><h1>Education</h1><br><p>Enter your education information.</p><br></div>";
new AppGiniField("High_School_Name")
  .insertAbove()
    
    .p(text8, "lead") // css classname "lead"
    ;

var text9 = "<div><h1>References</h1><br><p>Enter your references.</p><br></div>";
new AppGiniField("Reference_Name_1")
  .insertAbove()
    
    .p(text9, "lead") // css classname "lead"
    ;

var text10 = "<div><h1>Direct Deposit</h1><br><p>Enter your bank information.</b></p><br></div>";
new AppGiniField("Direct_Deposit")
  .insertAbove()
    
    .p(text10, "lead") // css classname "lead"
    ;

var text11 = "<div><h1>Agreements</h1><br><p>Complete this tab, Save Changes and click on Screener Dashboard.</b></p><br></div>";
new AppGiniField("Agreement_Date")
  .insertAbove()
    
    .p(text11, "lead") // css classname "lead"
    ;













pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1308
Joined: 2018-04-01 10:12

Re: How do I move the Children's table position?

Post by pböttcher » 2020-04-21 19:29

Can you comment this to see if it has an impact please.

nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

Re: How do I move the Children's table position?

Post by nycwebmaster » 2020-04-21 20:04

I actually did and is still not working. This is something..

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1308
Joined: 2018-04-01 10:12

Re: How do I move the Children's table position?

Post by pböttcher » 2020-04-21 20:19

can you post a screenshot after commenting the patients-dv.js

Post Reply