Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82324

How to Submit Data in Mjoin Link Table

$
0
0

Hi Allan,

According this example , and my question here, i need to submit data to the link table between 2 tables (create button)

Let say I have table | field
- act_log_header | act_log_id
- link_log_customer | act_log_id, customer_code
- master_customer | customer_code, customer_name

my php

->join(
            Mjoin::inst( 'master_customer' )
                ->link( 'act_log_head.act_log_id', 'link_log_customer.act_log_id' )
                ->link( 'master_customer.customer_code', 'link_log_customer.customer_code' )
                ->fields(
                    Field::inst( 'customer_code' )
                        ->options( 'master_customer', 'customer_code', 'customer_name' )
                        ->validator( 'Validate::notEmpty' ),
                    Field::inst( 'customer_name' )
                )
        )

the insert is only working on link_log_customer.customer_code
link_log_customer.act_log_id not submitted.

Can it be automatically submitted? or i must using postCreate ? I tried to put Field::inst( 'link_log_customer.act_log_id' ) , but no luck. Please advise, thank you

But it works on edit button

Danny


Viewing all articles
Browse latest Browse all 82324

Trending Articles