Closed maartenheideman closed 1 year ago
You can create hidden fields for the values you expect. Then on the template, you get the value from the URL and save it to the field value.
Thanks, I thought maybe there is a function to override values or set them dynamicly. But I'll fixed it by doing this:
{% for field in form.fields %}
{% if field.type == 'hidden' %}
<input type="{{field.type}}" value="{{ craft.app.request.queryParam(field.name) ?? '' }}" name="{{field.name}}"/>
{% endif %}
{% else %}
{{ field.render() }}
{{ wheelformErrors[field.name] is defined ? errorList(wheelformErrors[field.name]) }}
{% endif %}
{% endfor %}
Is it possible to set a field value through a url param? For example:
domain.com/form/?entryId=10&name=john
the form fieldsentryId
andname
must get the values set by the url?