Skip to main content
Answered

Default Values for Number Input field

  • 2 March 2022
  • 3 replies
  • 993 views

I need to show my form when i loads to have default values in it - so for the pizza example - you add that number to an overall price variable once someone puts a value in it..  How do I get a value into the fi\eld by default on page load?  Is that possible?

Hi @wade Welcome to the community! It isn’t exactly possible to have default values selected, but you could use hidden fields to pass information into the forms and then recall that information in the question. Would something like this work? 


So I can’t load a page that has 2 pizzas selected, - but if I only want 1 or 3 pizzas - I can update that field to be any other number?  Your suggestion would be to add a hidden field that has 2 in it, then load that number into the field on page load - then if the user changes that number, it would use that number now to calculate other things like price and toppings?  


Hi @wade yes, basically that’s it! You wouldn’t be able to pass more than one value into a hidden field, so you would need to be sure that you’re only passing in one value in order for the hidden field to work. 


Reply