Statbar with Dynamic Content ACF

Hi there, I need to use a statbar with dynamic content from acf. I was checking this thread and seems to be kind of possible Feature request: Setting Statbar lenght with dynamic content
however, the type of field I’m using is a slider, and even if I use text, I have to enter “%” with the numeric value, otherwise it won’t work.
My question is, beside when are you going to have that available using the dabase icon:
is there a way to add something like

{{dc:post:meta key=“something”}}%

so I add the percetange symbol on the page instead of the backend?

Hello @mcostales84,

The % sign is needed, like adding this {{dc:post:meta key="something" fallback="82%"}}, because the value will then be used in the backend and in the custom CSS:

Output:

Best Regards.

I know the % is necessary, but the value I’m getting from the custom field is without the %. My question is, if there is a way to add that % at the layout level?

Hey @mcostales84,

Regretfully, no. Percent is really needed in the key and fallback values, so you can’t use the Number field in ACF. I understand you want to add it at the layout level, but in case you change your mind, switching to the Text field and adding the % in the field would work.

image

but then I have to enter the symbol, otherwise it doesn’t work.
The funny thing is, with the old stat bar, it works like a charm, no need to enter the symbol, and I can use a slider inside ACF

Hey @mcostales84,

Yes. I only said that:

The Classic Statbar and the Statbar were built differently. Maybe in the future, this will change. Please stay tuned for updates.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.