0

I want to display my data form in confirmation form before submitting. My form and my confirmation form is in the same page, it's only devided by #tab. Now I want to display the data before submitting. I using data-display to display data in my confirmation form, and its work, but I don't know how to display data where type = file.

my blank data picture

enter image description here

My code:

<h4 class="form-section">Unggah Dokumen</h4>
<div class="form-group">
    <label class="control-label col-md-3">Surat Permohonan:</label>
    <div class="col-md-4">
        <p class="form-control-static" data-display="file"> </p>
    </div>
</div>
<div class="form-group">
    <label class="control-label col-md-3">Dokumen Pendukung:</label>
    <div class="col-md-4">
        <p class="form-control-static" data-display="dokumen_pendukung[]"> </p>
    </div>
</div>

my php code:

<h3 class="block">Unggah Dokumen</h3>
<div class="form-group">
    <table class="table table-striped table-bordered table-hover">
        <tr>
            <label style="text-align:left;" class="control-label col-md-3">Surat Permohonan<span class="required"> * </span></label>
            <div class="col-md-4">
                <?php if(isset($_GET['id'])){ ?>
                    <td class="1">
                        <?php echo @$applicationLetterrr;?><a href="javascript:;" id="edit"><i style="padding-left:12px;" class="fa fa-pencil"></i></a>
                        <input type="hidden" name="file2" value="<?= @$applicationLetterrr?>">
                    </td>
                    <td class="2">
                        <input id="fileid" type="file" accept="image/*, .pdf" name="file" style="width:100%" required title="Masukan minimal satu file">
                        <div class="class-progressbar" id="myProgress">
                            <div id="myBar">10%</div>
                        </div>
                    </td>
                <?php }else{ ?>
                    <td>
                        <input class="input-group" id="fileid" type="file" accept="image/*, .pdf" name="file" style="width:100%" required title="Masukan minimal satu file">
                        <div class="class-progressbar" id="myProgress">
                            <div id="myBar">10%</div>
                        </div>
                    </td>
                <?php } ?>
            </div>
        </tr>
    </table>
</div>
Manfred Radlwimmer
  • 12,469
  • 13
  • 47
  • 56

0 Answers0