Basic usage

                            
/**
 * Add widget in the main layout or view
 */
\conquer\modal\ModalForm::widget([
    'selector' => '.modal-form',
]);
                            
                        

Just add class modal-form to any clickable element.

                                        
Html::a('Sample modal form', 'ajax.html', ['class' => 'btn btn-primary modal-form']);
                                        
                                    
                                        
<a href="ajax.html" class="btn btn-primary modal-form">Sample modal form</a>
                                        
                                    

Use data-size attribute to configure window size.

                                        
Html::a('Sample modal form', 'ajax-size.html', ['class' => 'btn btn-primary modal-form', 'data-size' => 'modal-lg']);
                                        
                                    
                                        
<a href="ajax-size.html" class="btn btn-primary modal-form" data-size="modal-lg">Sample modal form</a>
                                        
                                    

Use data-singleton attribute to configure multiple modals behavior.

                                        
Html::a('Sample modal form', 'ajax-singleton.html', ['class' => 'btn btn-primary modal-form', 'data-singleton' => false]);
                                        
                                    
                                        
<a href="ajax-singleton.html" class="btn btn-primary modal-form" data-singleton="false">Sample modal form</a>