athep
Forum Replies Created
-
Forum: Plugins
In reply to: [Tutor LMS - eLearning and online course solution] Issue with starting lessonThe issue was missing menu orders, solved.
Forum: Plugins
In reply to: [Post My CF7 Form] Edit postwell is the $pid isn’t set then surely you want to load a black form, no? In which case simply force the form pre-filling query to return a null result.
Thank you, this worked well
Forum: Plugins
In reply to: [Post My CF7 Form] Can’t get data of repeated fieldsHello, I switched to your plugins fully from ACF and I’m getting the data just fine, I however would like to know how I could display the repeated fields? I did find a solution but I don’t think it’s efficient.
I also was wondering how to display repeated fields of tabbed tables, this has so many layers to it.
Forum: Plugins
In reply to: [Post My CF7 Form] Display repeated fieldsHello, I managed to get this working but with code you may not agree with because I think it’s really inefficient..
So I realized that the meta key for repeated fields start with an empty key ” ” and then an increment of “_row-1” “_row-2” etc.. with that in mind I came up with this:
$array = array( get_post_meta( get_the_ID(), 'data1', true ), get_post_meta( get_the_ID(), 'data2', true ), get_post_meta( get_the_ID(), 'data3', true ), ); echo '<table class="table-group">'; //the following shows the first group echo('<tr>'); echo('<td>'); echo $array[0]['']; echo('</td>'); echo('<td>'); echo $array[1]['']; echo('</td>'); echo('<td>'); echo $array[2]['']; echo('</td>'); echo('</tr>'); //a counter that checks the length of the first array $count = count( $array[0] ); $i = 1; while( $i < $count ) { //a number is appended to _row- $str = '_row-'; $x = $str . $i; echo('<tr>'); echo('<td>'); echo $array[0][$x]; echo('</td>'); echo('<td>'); echo $array[1][$x]; echo('</td>'); echo('<td>'); echo $array[2][$x]; echo('</td>'); echo('</tr>'); $i = $i + 1; } echo '</table>';
Forum: Plugins
In reply to: [Post My CF7 Form] Edit postI’m not good with PHP, I did however got a bit lucky with this snippet, this is after checking the author credentials and all.
$pid = $_GET['pid']; if( isset( $pid ) && get_post_status( $pid ) ) { update_post_meta($pid, '_cf7_2_post_form_submitted' ,'no'); } else { update_post_meta($pid, '_cf7_2_post_form_submitted' ,'yes'); }
The problem I have with this code is that the
else
part is not working.. if someone sets a differentpid
on/?pid=123
then the last post I set up for editing still shows up unless I click on submit.What can I do to set the form to only receive the form details of
pid
and not stay there once I change thepid
?Forum: Plugins
In reply to: [Post My CF7 Form] Can’t get data of repeated fieldsHello! The mapped taxonomies worked as expected but the repeater fields haven’t yet. I updated both the plugins.
- This reply was modified 2 years, 3 months ago by athep.
Forum: Plugins
In reply to: [Post My CF7 Form] Can’t get data of repeated fieldsSure thing, I’ll check it out
Forum: Plugins
In reply to: [Post My CF7 Form] Can’t get data of repeated fieldsThank you very much, I’d be honored to contribute to this amazing plugin
Forum: Plugins
In reply to: [Post My CF7 Form] Can’t get data of repeated fieldsSo this version seems to have a taxonomy bug, it doesn’t load them onto the select box
Forum: Plugins
In reply to: [Post My CF7 Form] Can’t get data of repeated fieldsThank you so much
Forum: Plugins
In reply to: [Post My CF7 Form] Edit postHello, I read the F.A.Q and also watched your video on this topic, I’d like to ask how I would go about creating a link that would pre-fill the add post page with the post I want edited, this means the link passing the post ID?
I’m not very proficient with backend so I did my best to implement the code you added on your F.A.Q
Also thank you for the life saving plugin! Great work.
Forum: Plugins
In reply to: [Post My CF7 Form] Edit postThank you!
Ok thank you
Yes of course
Thank you, it worked