Title: Setting Default Field Value Dynamically
Last modified: February 24, 2018

---

# Setting Default Field Value Dynamically

 *  Resolved [gxwpm](https://wordpress.org/support/users/gxwpm/)
 * (@gxwpm)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/setting-default-field-value-dynamically/)
 * Hey,
 * Sorry if I miss a post about it, I’m searching about this since days.
 * My main goal is to disable or somehow prevent submissons with getting some data
   that is out of form. It’s like a payment form that prevents user to submit if
   his balance is below a limit. I get that balance data from a shortcode or function.
 * So, I can’t use form’s conditional logic because only place I can use a shortcode
   on is html field. But that field can’t transfer its value anywhere.
 * I’ve tried some workarounds like passing that value from html field to other 
   fields like text, number and hidden, tried to pass it variable as a value, tried
   to set a default value directly from caldera insert shortcode etc but no luck,
   my coding skills not enough for it. Can I get your help for it?
 * I need to find a way to get a data from my shortcodes or functions and put them
   on the form to do some logic on submissions like disabling button etc.
 * Thanks,

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [christiechirinos](https://wordpress.org/support/users/christiechirinos/)
 * (@christiechirinos)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/setting-default-field-value-dynamically/#post-10047500)
 * Hi there,
 * Thanks for using Caldera Forms, it means a lot to us.
 * This isn’t exactly something Caldera Forms can do. You can use the Caldera Forms
   shortcode to specify a single value that a field should be, as shown here: [https://calderaforms.com/doc/caldera_forms_render_get_field/](https://calderaforms.com/doc/caldera_forms_render_get_field/).
   But setting that to some other shortcode, within the shortcode, is not possible.
 * We wrote a guide on how you may be able to achieve this similar goal, using an
   approach around caldera_forms_render_get_field. It sounds like you are comfortable
   writing a function to be a shortcode, so you could use that same code with this
   filter. [https://calderaforms.com/doc/setting-field-default-values-dynamically/](https://calderaforms.com/doc/setting-field-default-values-dynamically/)
 * As always, you can get same-day help from us by opening a Priority Support ticket
   at [https://calderaforms.com/support](https://calderaforms.com/support).

Viewing 1 replies (of 1 total)

The topic ‘Setting Default Field Value Dynamically’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/caldera-forms_475846.svg)
 * [Caldera Forms - More Than Contact Forms](https://wordpress.org/plugins/caldera-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/caldera-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/caldera-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/caldera-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/caldera-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/caldera-forms/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [christiechirinos](https://wordpress.org/support/users/christiechirinos/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/setting-default-field-value-dynamically/#post-10047500)
 * Status: resolved