Johann Heyne
Forum Replies Created
-
Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Table field in taxonomy term not showingDo you mean on an edit page of a taxonomy term or in a post/posttype/page by an active term? Both should work. But these are different rule options. Maybe there is an mistake or I have an issue with it but I can not replicate it for now and need more specific informations.
The issue will be fixed in the next ACF release version 5.4.0
Thanks again for reporting,
JohannThe status is, that this is not an easy to solve issue. There are several solutions to solve the problem but with pros and cons. Elliot and I are still discussing about.
Hello seedpxwee5,
release 1.1.11 should fix that table refreshing behaviour on every content change. Now I trigger this table refreshing more specific on the relevant rule changing form elements.
There was an issue displaying table fields by fieldgroup rules like post taxonomies after changing them in a postbox. But yes, I have to rethink this for a better solution and will give a feedback within the next 24 hours. Thanks for reporting that issue to me.
Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Pre-fill tableI still working on the pro version but I can´t estimate when it will be published. It needs time to build a solid foundation for a long-term solution that is extendable and maintainable.
Elliot replied me. He will test this issue and may fix it.
Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] hyperlink to valuesJust use PHP while rendering the table.
foreach ( $table['body'] as $tr ) { echo '<tr>'; $i = 0; foreach ( $tr as $td ) { $i++; echo '<td>'; if ( $i === 1 ) { // cell in first column } echo '</td>'; } echo '</tr>'; }Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Color Specific ColumnsYou can set different style classes in the table element.
CSS
.style1.table { /* your first table styles */ } .style2.table { /* your second table styles */ }HTML
<table class="style1 table"> <!--table row and cell elements --> </table> <table class="style2 table"> <!--table row and cell elements --> </table>And then you could use an “choice” field next to the table field in the repeater to let the user choose
style1orstyle2.PHP
// loop through the repeater rows of data while ( have_rows( 'repeater_field_name' ) ) : the_row(); // get the table style choice fields value $tablestyle = get_sub_field( 'tablestyle' ); $table = get_sub_field( 'your_table_field_name' ); if ( $table ) { echo '<table class="' . $tablestyle . ' table">'; // other table elements echo '</table>'; } endwhile;Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Color Specific ColumnsForum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Change field with filterSorry. I do not understand your question. And it is not belonging to the table plugin.
Thanks for reporting that. I found out, that in general restoring a revision seams to remove all backslashes “\” from ACF fields. This destroys escaped characters like a line break. This can also destroy the syntax of a JSON string in a ACF field.
This is caused by the ACF wp_restore_post_revision() function while updating post meta. This function uses update_post_meta(), a WordPress function, which passes the value through the stripslashes() function. This could fixed by ACF using wp_slash() on the value before using update_post_meta(). I will ask the ACF support to fix that.
Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Add Media buttonThanks for your request. I will consider that.
Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Exposing table data as Rest JSONecho $table['b'][0][0]['c'];This code echo the first top, left table cell of the tables body. [‘b’] represents “body”. The first [‘0’] represents the first row. The second [‘0’] represents the first cell of the row. [‘c’] represents the content of a cell. And so on. [h] represents the table header. Because there is only one row as the header you can echo the first cell by:
echo $table['h'][0]['c'];Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Pre-fill tableUnfortunately I don´t see any helpful solution. I’m still working on the Pro version of the plugin, which makes predefined tables possible.