I want to know how to show form field editable on button click in PHP. Part of my view file:
<?php echo Form::label("email", "Email"); ?>
<?php echo Form::input("email", $userdetails->email,array('disabled' => 'disabled')); ?>
<br/>
<?php echo Form::label("description", "Description"); ?>
<?php echo Form::textarea("description", $userdetails->description,array('disabled' => 'disabled')); ?>
<br/>
<?php echo Form::submit("submit", "Submit"); ?>
<?php echo Form::close(); ?>
<a href="../index"><input type="button" name="edit" value="Edit" ></a>
In the page load field should be disabled
.
If the user clicks the Edit button the hidden field should turn to editable.