<form action="" method="post">
        <div class="col-sm-12 text-left" style="padding: 10px;">
            <div class="col-sm-1 padding-zero"> 
                <span><img src="<?php echo base_url() ?>image/logo.png" style="width: 20px" class="img-responsive"></span>
            </div>

            <div class="col-sm-9 padding-zero person_info_url" style="font-size: 14px; display: inline-block; overflow: hidden; white-space: nowrap;">
                <a href="<?php echo base_url() . $person_info->url . '/' ?>profile">
                    <span class="col-sm-5 padding-zero text-right" >                    
                        <?php echo base_url(); ?>
                    </span>
                    <span class="col-sm-5 padding-zero" id="viewURL" style="margin-left: 0px">
                        <?php                                                 
                        if(strlen($person_info->url) < 30){
                        echo $person_info->url;
                        }
                        else{
                            echo substr($person_info->url, 0, 30).'.'.' '.'.'.' '.'.';
                        }
                        //echo $person_info->url;
                         ?></span> 
                </a>
                <input data-errormessage-value-missing="profile url is required!" 
                       oninput="checkUrlExists(this.value,old_url.value)"
                       class="col-sm-6 padding-zero margin-zero" 
                       id="URLfield" style="display: none;" type="text" name="url">
            </div>
            <input type="hidden" id="old_url"  value="<?php echo $person_info->url; ?>">
            <input type="hidden" id="url_validate"  value="">
            <?php if($this->session->person_id === $this->session->view_person_id){ ?>
            <div class="col-sm-2" style="padding: 0;" id="edit_url">
<!--                <a href="javascript:void(0)"  onclick="updateUrlForm()"> 
                    <i class="fa fa-edit" title="Update URL Form"> </i>
                </a>-->
            </div>
            <?php } ?>
            <input id="url_id"  type="hidden" value="<?php echo $person_info->url_id; ?>">
            <div class="col-sm-2" style="padding: 0; display: none" id="save_update_url">
                <a href="javascript:void(0)" id="update_btn" onclick="updateUrl(url_id.value, URLfield.value, old_url.value)"> 
                    <i class="fa fa-save" title="Update URL "> </i>
                </a>
            </div>

        </div>
        <span id="message" style="color:red"></span>
    </form>
    <input type="hidden" id="url_change_different" value="<?php echo $url_changed_data['url_change_different']; ?>">