We are working for update doc for SXIMO 5.1.7

Master Detail

Master Table Schema

CREATE TABLE `states` (    
	`StateID` int(6) NOT NULL AUTO_INCREMENT,    
	`StateName` varchar(100) DEFAULT NULL,    
	 PRIMARY KEY (`StateID`)  
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1  

Detail Table Schema

CREATE TABLE `cities` (    
	`CityID` int(6) NOT NULL AUTO_INCREMENT,    
	`StateID` int(6) DEFAULT NULL,    
	`CityName` varchar(100) DEFAULT NULL,    
	PRIMARY KEY (`CityID`)  
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1  

As you can see , the cities table contain StateID as relation to master table

Now , lets create 2 modules , State and Cities . Please refference to how create module

Setting up the master Detail

Now , we need to setting Master module ( State ) and linking it to detail module ( Cities )

Step 1 : State Module Configuration

  • Table Editor , Hide StateID field
  • Form Editor , make StateID as hidden field type and make StateName as input type and required
  • MasterDetail configuration,
Link Title : Cities  
Master Key : StateID  
Module Target : Cities  
DB Table Module Target : cities  
Detail Key : StateID  

Step 2 : Rebuild the codes

After done with new configuration , please rebuild the state module ( rebuild all files )

Step 3 : Test new master detail CRUD

Now go to State module and click button create , you'll see extend form under state master form