Could you point a way to always obligate a view control to be enabled?

Hi Experts

Could you point a way to always obligate a view control to be enabled?

After using a "view modal"  after going to "edit modal" the combo controls are disabled.

View control
<div class="col-xs-8 mb15">
	<label for="fk_cliente_corporativo" class="field-label text-muted mb10">Produto</label>
	<label for="fk_cliente_corporativo" class="validar field select">
		<?php echo $fk_cliente_corporativo;?>
		<i class="arrow double"></i>

Open in new window

  $('#view').on('', function () {

		console.log("Modal VIEW");

		var file = $("#view #anexo").val();
		var parts = file.split('/');
		var file = parts[parts.length-1];
		 $("#view #anexo").val(file);


  $('#edit').on('', function () {

        console.log("Modal EDIT");
	$('#edit input').prop("disabled", false);

       //Using class validar to force the control to be enabled => No success.
	$('#edit .validar').prop("disabled", false);

Open in new window

When  only using "Modal view"  the control isn't disabled.
Eduardo FuerteAsked:
Who is Participating?
Julian HansenConnect With a Mentor Commented:
The only way to solve this is to find out what is disabling them and address that. You can't set a control to never be disabled.
Eduardo FuerteAuthor Commented:

You are completelly right. I finally found that a helper that outputs to the view with code disables controls in the view.

End of the view
        echo datatables_crud_modal(array(
            'controller' => 'reclamacao',
            'edit' => array(
                'action' => array(
                    'save' => 'save',
                    'entity' => 'get',   
                    'status' => 'update',
            'view' => array(
                'action' => 'view'

Open in new window

The code commented.
Something a little obvious.

That's solved by your assistance (and patience with so repeated questions)
Eduardo FuerteAuthor Commented:
Thank you for assistance!
Julian HansenCommented:
You are always welcome Eduardo, well done on nailing it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.