Jump to content
#FlattenTheCurve ×

jairogill

New Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jairogill

  • Rank
    Newbie
  1. Hi, I am triying to add dash in the phone numbers when added, the phone numbers are added complete without spaces. like: 1234567890, and i want the output to be: 123-456-7890 Depending on where the number is from it will change, for ex.: Italy is: +391234567890 (+39-123-456-7890) Spain is: +34123456789 (+34-123-45-67-89) and so on. this is the code im triying to add it to: <div class="btn-group btn-group-sm" role="group" aria-label="Extra-small button group"> <a class="client_copy btn btn-gold" data-client-name="<?php echo $emp['client_name']; ?>" data-Client-email="<?php echo $emp['id_clients']; ?>" data-client-phone="<?php echo $emp['phone_no']; ?>" data-client-id="<?php echo $emp['ID']; ?>" data-client-group="<?php echo $emp['group_name']; ?>" data-client-city="<?php echo '$' . $emp['myprice']; ?>" data-client-paymentmethod="<?php echo $emp['payment_method_name']; ?>" data-client-paymentvia="<?php echo $emp['payment_via_name']; ?>" data-client-paymentdetail="<?php echo $emp['payment_detail']; ?>" data-client-paymentdate="<?php echo $emp['payment_date']; ?>" data-client-customprice="<?php echo $emp['custom_price']; ?>" href="#modalCopyClient"><i class="fa fa-files-o"></i></a> So, the phone part is: data-client-phone="<?php echo $emp['phone_no']; ?>" i tried a couple solutions but i coulndt make it work one of them was to add: echo '('.substr($data, 0, 3).') '.substr($data, 3, 3).'-'.substr($data,6); that may be the solution but it didnt work for me, i ended having an error i add it this way: data-client-phone="<?php echo '('.substr($data, 0, 3).') '.substr($data, 3, 3).'-'.substr($data,6); $emp['phone_no']; ?>" and had this error: (see image attached) i know the error might be obvious but i just dont know that much about coding. sorry. thanks!
  2. ohhh, i did it because i didnt know if what i was asking was inside those two blocks, thats why i put the file just in case it wasnt there!
  3. Thanks so much! that worked, the filled was called myprice.. What do you mean about the rest of the code? is it that bad? Thanks again
  4. Hi, first things first, i dont know nothing about coding... i can figure out how some stuff works and make changes but nothing more than that... that been said, i paid a guy to make a CRM, a webapp for a business to handle the clients. the thing is that i cannot contact the guy anymore and i need a small change to be made in the system, i tried to do it mysell but no success! in the clients section i have a button that when you hit it opens up a window and shows client info to copy it and send it via a messaging app.. right now when you hit it it shows this info: Client name Phone number ID GROUP City Payment method Payment Via Payment Detail Payment date where it shows the city i want it to show the group price instead... this is the code for that section of the system: <td> <div class="btn-group btn-group-sm" role="group" aria-label="Extra-small button group"> <a class="client_copy btn btn-gold" data-client-name="<?php echo $emp['client_name']; ?>" data-Client-email="<?php echo $emp['id_clients']; ?>" data-client-phone="<?php echo $emp['phone_no']; ?>" data-client-id="<?php echo $emp['ID']; ?>" data-client-group="<?php echo $emp['group_name']; ?>" data-client-city="<?php echo $emp['city_name']; ?>" data-client-paymentmethod="<?php echo $emp['payment_method_name']; ?>" data-client-paymentvia="<?php echo $emp['payment_via_name']; ?>" data-client-paymentdetail="<?php echo $emp['payment_detail']; ?>" data-client-paymentdate="<?php echo $emp['payment_date']; ?>" data-client-customprice="<?php echo $emp['custom_price']; ?>" href="#modalCopyClient"><i class="fa fa-files-o"></i></a> and this part: <div class="modal fade" id="modalCopyClient"> <div class="modal-dialog"> <div class="modal-content"> <form id="formUpdateClient" action="<?php echo base_url(); ?>index.php/UpdateClients" method="post"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Copiar los datos del cliente</h4> </div> <div class="modal-body"> <div class="form-group"> <div class="row"> <div class="col-md-6 copydiv"> <div><label id="txtCopyClientName" name="txtCopyClientName"></label></div> <div><label id="txtCopyPhone" name="txtCopyPhone"></label></div> <div><label id="txtCoyClientID" name="txtCoyClientID"></label></div> <div><label id="txtCopyGroup" name="txtCopyGroup"></label></div> <div><label id="txtCopyCity" name="txtCopyCity"></label></div> <div><label id="txtCopyPaymentMethod" name="txtCopyPaymentMethod"></label></div> <div><label id="txtCopyClientPaymentVia" name="txtCopyClientPaymentVia"></label></div> <div><label id="txtCopyPaymentDetail" name="txtCopyPaymentDetail"></label></div> <div><label id="txtCopyClientPaymentDate" name="txtCopyClientPaymentDate"></label></div> </div> </div> <div class="modal-footer"> <button type="button" id="myBtn" class="btn btn-success">Copiar</button> <button type="button" class="btn btn-link" data-dismiss="modal">Cerrar</button> </div> </div> </form> </div> </div> </div> can you guys please help me to make this change?? also, the data shows in the window the way i want, but as soon as i hit the copy button and paste it where i want to send it, the data shows differently i attached the hole file in the thread just in case and also if you need access to the system let me know so i can give you the access. THANKS! clients_view.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.