dti70601 2016-01-12 11:22
浏览 37
已采纳

CodeIgniter:form_input为readonly

I have the following form input:

<?php echo form_input(array('name'=>'stockist['.$stockist->ID.'][ID]','value'=>form_decode($stockist->ID), 'class'=>'span1'));?>

I'd like to make this a read-only field, however any attempt to make this read=only using HTML syntax throws an error. Does anyone know if it's possible to make a form_input type read only?

Thanks

  • 写回答

3条回答 默认 最新

  • dqqg0811 2016-01-12 11:29
    关注
    <?php echo form_input(array('name'=>'stockist['.$stockist->ID.'][ID]','value'=>form_decode($stockist->ID), 'class'=>'span1','readonly'=>'true'));?>
    

    This will do your work! Good Luck!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?