Hi All - Thanks in advance for any guidance.
I'm using the paragraph field to display a confirmation message to the user before the form is completed. I'm using the FP shortcodes to pull in the information they submit into the fields and displaying a paragraph.
Ex: User states they need 160l x 280w feet of something. I calculate the square footage and it's part of the confirmation message.
Ex message: Thanks [fname], please confirm that you need 160L x 289W, or [sqft] of the thing you need.
Problem: The [sqft] shows as a single string, ie: 44800 - I have tried using the [XX thousands_sep=","] and it simply shows the shortcode instead of the value with a comma separator ex: 44,800.
Is there a way to get this to display the properly format number in a paragraph field? (It does not work in an html field either)
Thanks,
Mark
Since the form hasn't been submitted at the data isn't associated with an entry, the only way I can think of to accomplish this is jQuery. In your confirmation message, you have some placeholder element (e.g., span) and use jQuery to "do the math" and put that text into the span.
Thanks, Rob. I'm trying to get away with not having the user submit the form at all - it's really a basic calculator and nothing more, so it shows the user the result on the same page and will not likely have any submit function at all.
I'll try to find a workaround.
Much appreciated input.
The only thing I can think of outside of jQuery (which isn't hard, but that's easy for me to say if you don't know jQuery) is to have some awkward-looking fields that cozy up next to each other and look like they belong that way. i.e., You have an HTML field with the text "Thanks " and next to it as close as possible put a text field with a calculation using the field ID of the first name, and then another HTML field with "please confirm that you need" and so on and so on. It might be a CSS nightmare, but it might work.
As-is, it's really not too bad, it just doesn't look as perfect as I'd prefer. Haha. What's odd, is that the [XX thousands_sep=","] doesn't work on any type of field when you create a basic calculator. It MAY work after it's been submit, but that somewhat defeats the entire purpose.
Thanks again,
Mark
Here's an old article I wrote about formatting fields as currency. This will work for your challenge. https://formidable-masterminds.com/formatting-fields-as-currency/
Thanks, Victor! I believe I've actually used this before (doh!) and completely forgot about it. Age is starting to reach out and remind me of things.
Much appreciated!
Please login or Register to submit your answer