Get the LAST index of a repeating field
Started by: David
in: Toolset Professional Support
Quick solution available
Problem:
I'm utilizing a repeater field to capture the years of each particular model of car. I can easily retrieve the first index with the following:
[types field='vehicle-year' index='0' separator=', '][/types]
My question is how do I retrieve the LAST index item of any particular car?
Solution:
There isn't such kind of built-in feature, you might consider custom codes, for example:
https://toolset.com/forums/topic/get-the-last-index-of-a-repeating-field/#post-2020227
Relevant Documentation:
2
3
4 years, 10 months ago
David
Split: various template for single page – display map on different content template
Started by: winyS
in: Toolset Professional Support
3
5
4 years, 10 months ago
winyS
Suggestion for any Toolset plugin/addon for Add to favorite for custom post type
Started by: kevinQ
in: Toolset Professional Support
2
2
4 years, 10 months ago
Waqar
hyperlink of child form not showing correctly
Started by: mikeB-14
in: Toolset Professional Support
2
8
4 years, 10 months ago
mikeB-14
Conditional display of custom fields
Started by: alistairW-2
in: Toolset Professional Support
Quick solution available
Problem:
I think it would be easier to edit so many conditional statements in the old editor but I tried converting the block into the tradition editor and I received a message saying there was no template and it would be reset and it did change the interface to the old views but I lost all the content. Is there any way I can see and edit the content in code somewhere?
Solution:
You can setup the [wpv-conditional] shortcodes with Toolset "Fields and Text" block, in the "Fields and Text" block menu, click the "IF" button, and setup conditions, insert the the [wpv-conditional] shortcodes into content, switch to HTML codes editor, then you will be able to see and edit the content in codes
See screenshot:
https://toolset.com/wp-content/uploads/2021/04/2017899-field_and_text.jpg
Relevant Documentation:
https://toolset.com/block-item/fields-and-text/
2
9
4 years, 10 months ago
alistairW-2
Pre Sale Query on Toolset License
Started by: glosoftI
in: Toolset Professional Support
2
2
4 years, 10 months ago
Christian Cox
Where do i add license key?
Started by: stewartE
in: Toolset Professional Support
2
6
4 years, 10 months ago
Christian Cox
Toolset types plugin related with small checkout fields
Started by: nestorC-2
in: Toolset Professional Support
2
2
4 years, 10 months ago
Shane
Disable toolset loading on certain backend pages
Started by: mikeH-3
in: Toolset Professional Support
2
2
4 years, 10 months ago
Shane
Exclude Toolset Custom Post type from search
Started by: Adrian
in: Toolset Professional Support
2
3
4 years, 10 months ago
Adrian
types 3.4.7 breaks back end as soon as activated
Started by: michaelG-21
in: Toolset Professional Support
2
4
4 years, 10 months ago
Shane
Displaying Term Fields on the Front-end
Started by: Paulo Ramalho
in: Toolset Professional Support
Quick solution available
Problem:
The user is building a theme and would like to display some term fields inside the single post template file.
Solution:
Use similar code to this one to get the values of the terms:
$taxonomy_slug = "book-author";
$authors = get_the_terms( get_the_ID(), $taxonomy_slug );
$author_ids = wp_list_pluck( $authors, 'term_id' );
foreach ($author_ids as $author_id) {
echo types_render_termmeta("foto-del-autor", array( "term_id" => $author_id, "width" => "100", "height" => "100" ) );
}
Update the first line with your taxonomy slug.
Relevant Documentation:
3
6
4 years, 10 months ago
Paulo Ramalho
edit forms
Started by: ericW-5
in: Toolset Professional Support
2
2
4 years, 10 months ago
Christian Cox
View grid is not displayed correctly
Started by: alexandreG-2
in: Toolset Professional Support
Quick solution available
2
3
4 years, 10 months ago
alexandreG-2
Apply CSS to just one out of many SELECTs in Forms
Started by: nicolaS-3
in: Toolset Professional Support
Quick solution available
Problem:
The user would like to apply custom CSS to one select field inside a form.
Solution:
You can target custom fields using the following selector:
select[name=wpcf-book-status] {
height: 145px;
}
Where book-status is the slug of the field.
And you can target taxonomies with their slugs:
select[name="category[]"] {
border: 1px solid red;
padding: 10px;
margin: 10px;
}
Where category is the taxonomy's slug. Note that you must add [] to the taxonomy slug. Because taxonomies accept multiple values by design.
2
9
4 years, 10 months ago
nicolaS-3