- This topic has 4 replies, 3 voices, and was last updated 3 years, 2 months ago by
Tom.
-
AuthorPosts
-
February 15, 2023 at 5:35 am #2534019
KEREM SARI
Hello,
There was a great earthquake in our country. Its destructiveness is very high. 10 of our cities were affected.
I am trying to voluntarily fulfill a request of the psychologist association in our country.
People affected by the earthquake fill out forms to receive free psychological support.
Volunteer psychologists provide support.
I list those who want support in a table on a page that only psychologists can see.
Our problem is this. In this list, psychologists need to add options such as “processed, not reached, concluded”.
Is there anyone who can help with this?
Contact Form 7 and Advanced CF7 DB
I used a translation, please excuse me if anything is unclear.
Thanks,
Kerem SARI
https://wa.me/+905327442058February 15, 2023 at 7:55 am #2534323David
StaffCustomer SupportHi there,
are you look for someone to help you create the contact form ?
February 19, 2023 at 2:18 am #2538506KEREM SARI
Hi David,
There is no problem with the form.
We listed the data that came with the form on one page.
We wanted to make this list dynamic.
We got it done.
But we are having problems with page refresh.
We couldn’t get it to refresh the page when we run the buttons.
<?php $Sutunlar6=Array('data_id', 'ad-soyad', 'tel', 'sehir', 'ilce', 'yas', 'uzman', 'yontem', 'mesaj', 'submit_time', 'email', 'hekim', 'islemtarihi', 'islem', 'submit_ip'); $SutunAdlari6=Array('Data ID', 'Adı Soyadı', 'Telefon', 'Şehir', 'İlçe', 'Yaş', 'Uzmanlık', 'Yöntem', 'Mesaj', 'Kayıt Tarihi', 'e-Posta', 'İlgili Hekim', 'İşlem Tarihi', 'İşlem', 'IP'); $SutunSens6=Array('E', 'E', 'EA', 'H', 'H', 'H', 'H', 'H', 'E', 'H', 'EA', 'E', 'H', 'E', 'E'); $Sutunlar54=Array('data_id', 'adiniz', 'email', 'tel', 'sehir', 'ilce', 'uz1', 'uz2', 'uz3', 'uz4', 'uz5', 'hz1', 'hz2', 'yas1', 'yas2', 'yas3', 'mesaj', 'submit_time', 'belge', 'belge2', 'submit_ip'); $SutunAdlari54=Array('Data ID', 'Adı Soyadı', 'e-Posta', 'Telefon', 'Şehir', 'İlçe', 'Uzmanlık-1', 'Uzmanlık-2', 'Uzmanlık-3', 'Uzmanlık-4', 'Uzmanlık-5', 'Hizmet Yöntemi-1', 'Hizmet Yöntemi-2', 'Yaş-1', 'Yaş-2', 'Yaş-3', 'Bilgi', 'Kayıt Tarihi', 'Belge-1', 'Belge-2', 'IP'); $SutunSens54=Array('E', 'H', 'HA', 'HA', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'E', 'EA', 'EA', 'E'); $Form_id=54; // Form_id (yazılacak) $Form_id=6; // Form_id (yazılacak) //$current_user = wp_get_current_user(); $current_user = wp_get_current_user(); $current_usern = $current_user->user_login; $current_userf = $current_user->user_firstname; $current_userl = $current_user->user_lastname; $current_userd = $current_user->display_name; $current_useri = $current_user->ID; //echo $current_usern.'<br>'; //echo $current_userf.'<br>'; //echo $current_userl.'<br>'; //echo $current_userd.'<br>'; //echo $current_useri.'<br>'; //echo '<br><br><br>'; global $wpdb; $query = $wpdb->get_results("SELECT data_id FROM <code>wp_cf7_vdata_entry</code> WHERE <code>cf7_id</code> = $Form_id GROUP BY <code>data_id</code>"); $formcount = count($query); //echo print_r($query); //echo '<br>Satır12----><br>'; $wp_gelenVeri=$wpdb->get_results("select * from wp_cf7_vdata_entry WHERE <code>cf7_id</code> = $Form_id"); //echo print_r($wp_gelenVeri[0]); for($f = 0;$f < $formcount; $f++){ for($i = 0; $i < count($wp_gelenVeri); $i++){ for($a = 0; $a < count($Sutunlar6); $a++){ if($wp_gelenVeri[$i]->data_id==$query[$f]->data_id){ $TableResult[$f]['data_id'] = $wp_gelenVeri[$i]->data_id; $TableResult[$f][$wp_gelenVeri[$i]->name] = $wp_gelenVeri[$i]->value; } } } } $totalkeys=count(array_keys($TableResult[0])); //echo '<br> Toplam Key: '.$totalkeys.'<br>'; //print_r($TableResult); //echo '<br> Toplam Key: '.$totalkeys.'<br>'; ?> <div class='row-6 form-table-class1 form-table-class2'> <table> <thead><tr> <?php foreach($SutunAdlari6 as $Sutun){ // echo '<td><strong>'.$Sutun.'</strong></td>'; } for($a = 0; $a < 9; $a++){ echo '<td><strong>'.$SutunAdlari6[$a].'</strong></td>'; } echo '<td><strong>Detaylar</strong></td>'; ?> </tr></thead> <?php for($f = 0; $f < $formcount; $f++){ echo '<tr>'; for($a = 0; $a < 9; $a++){ echo '<td>'.$TableResult[$f][$Sutunlar6[$a]].'</td>'; // echo '<td>'.$TableResult[$a][$key].'</td>'; } if($TableResult[$f]['hekim'] == $current_userd){ echo '<td> <form action="./wp-content/vazgec.php" method="get"> <button name="Showid" type="submit" value="'.$TableResult[$f]['data_id'].'">Vazgeç</button> </form>'; }else{ if($TableResult[$f]['hekim'] != ''){ echo '<td><button disabled>'.$TableResult[$f]['hekim'].'</button></td>'; }else{ echo '<td> <form action="./wp-content/goster.php" method="get"> <button name="Showid" type="submit" value="'.$TableResult[$f]['data_id'].'">Göster</button> </form>'; } } echo '</tr>'; } ?> </table> </div> </div> <?php echo 'Toplam Kayıt Sayısı: '.$formcount.'<br>'; ?>February 20, 2023 at 4:04 am #2539641David
StaffCustomer SupportI have asked the other devs if they can take a look, and if they have any advice.
In the meantime, might be worth also asking on StackExchange.February 20, 2023 at 8:48 pm #2540674Tom
Lead DeveloperLead DeveloperHi there,
This part should force the page to refresh:
<form action="./wp-content/vazgec.php" method="get">I’m not sure what
vazgec.phpconsists of, but I’ve always done something like this:if ( isset( $_POST['my_form_input'] ) ) { // Do something with input. wp_redirect( get_the_permalink() ); exit; } -
AuthorPosts
- You must be logged in to reply to this topic.