Skip Navigation

[Resolved] Is there a way to make the value from the generated shortcode will be integer?

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 replies, has 3 voices.

Last updated by Shane 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1229379
progress_bar-value.JPG
progress_bar-support.JPG

I have a progress bar widget, on that widget there are 2 dynamic fields,

1. Percentage field: this can be characters and numbers
2. Value field: numbers

My problem is that, when I use dynamic shortcode to pull the data from my Progress Bar (numeric) custom field to show up on Percentage field, it does show. But when i use the same shortcode to pull the data from Progress Bar custom field to show up on Value field, it does nothing.

I use shortcode because, the Progress Bar custom field is in the other custom post type.
Using Toolset field - progress bar custom field, doesn't show anything.

I did reach out support from the progress bar widget team. Below is his reply.

#1229391

Try this:
- Create a copy of this View
- In the copy, check "Disable the wrapping Div"
- Remove all spaces, line breaks, and HTML markup from the Loop Editor
- If your View uses a Content Template, remove all spaces, line breaks and HTML markup from that template
This should produce basic output without extra HTML markup.

#1230522
progress_bar_toolset_view1.JPG
progress_bar_toolset_view.JPG

Hi Chris,

Attached settings of a copy of this view.
Attached result is still the same.

Am I missing something?

Thanks

#1230667

- Remove all spaces, line breaks, and HTML markup from the Loop Editor
I still see spaces and line breaks in the Loop Editor, so you haven't quite finished this part yet. Everything in the Loop Editor should be on one long continuous line, with no breaks or tabs or spaces between the shortcodes and tags. Also be sure to delete any space after wpv-layout-end, because there is an empty line there now.

Also, I would probably delete the wpv-post-body shortcode from the loop and replace it with the progress bar shortcode. The Content Template here only holds one shortcode so it's not really useful. If you want the raw value (number) you should use the raw output option in the field shortcode, so it would look like this after removing line breaks and spaces from the loop:

...<wpv-loop>[types field='progress-bar' output='raw'][/types]</wpv-loop>...
#1230815
Toolset.jpg

Hi again,

Still the same.

Attached photo for reference,

from section A: I followed what you ask me to do.
By using this approach, only the Percentage field is working fine but the Value field is not.
(**custom Post Type child - Projects Updates)

from section B: I create a new custom field inside my parent custom Post Type (Projects), create a new View and follow the same instructions as you mentions on your previous reply. The only difference from this section B to section A is that, No Query filter settings for section B.
By using this approach, only the Percentage field is working fine but the Value field is not.

from section C: I create a new custom field inside my parent custom Post Type (Projects), instead of using dynamic shortcode, I use toolset field. Both Percentage and the Value field are working fine.

*As much as possible, i don't want to put the progress bar field to my parent post type (Projects) it should be on Projects Updates as it needs to update regularly, that's why im not using the Section C for this.

#1230986

If you place the project-updates-progress-bar-value View somewhere else in the template like in a text block, what are the results?

#1231450
Toolset-shortcode.JPG

Here is the result, with the same shortcode on different field type.
I did try on Heading widget and it works fine, the number is showing up.

#1231811

May I log in and take a look in wp-admin? I would like to see more details. If not, please provide a Duplicator copy so I can perform some tests locally.

#1232360

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Abdulla,

I believe the problem here is that the module isn't able to process the view shortcode to get the value.

I would recommend opening a ticket with the elementor team as they are better able to advise you on this one. Our shortcode is providing the content as it requires it.

Thanks,
Shane