Please note: Access to templates (Preferences->Templates) is required to add extra fields, which is only available on Professional or Higher plans.
Warning: Always store a local copy of the template before making any changes to it.
There are two ways of adding custom fields in Gift Reggie. First, if you are not using some of the existing fields, such as "evening telephone", you can rename them and use them to store a custom field value.
Please note: Some fields are mandatory to create a registry, such as Registry Title, Event Date, Registrant Details, and Contact Information, so please do not remove those fields.
Second, Gift Reggie supports a single extra field titled 'extra'. The value entered by the user will appear under the Registry extra information field on the backend.
If you would like to add an extra field, you will need to modify the template file proxy_registry_info.liquid.
<input name='extra' type='text' value='{{ extra | escape_html }}'/>
To display this info on the registry page, you can do it by using the liquid code below:
{{ extra | escape_html }}
If you need multiple custom fields, the best practice is to keep one hidden extra field and store all custom values inside it as JSON.
For example, if you want to collect:
- Venue name
- Guest code
- Meal choice
We would add visible inputs like this:
<p>Venue Name <input type="text" id="venue-name" /></p>
<p>Guest Code <input type="text" id="guest-code" /></p>
<p>Meal Choice <input type="text" id="meal-choice" /></p>
<input type="hidden" name="extra" id="registry-extra" value="{{ extra | escape_html }}" />
Then, before the form submits, those values are combined into the hidden extra field as JSON:
<script>
window.jqReady.push(function(jQuery) {
(function($) {
$('#giftreggie-create-form').on('submit', function() {
var extraData = {
venue_name: $('#venue-name').val(),
guest_code: $('#guest-code').val(),
meal_choice: $('#meal-choice').val()
};
$('#registry-extra').val(JSON.stringify(extraData));
});
})(jQuery);
});
</script>
That would store data like this inside extra:{"venue_name":"Sunset Hall","guest_code":"A12","meal_choice":"Vegetarian"}
To display data from extra later, you can use something like
{% assign extra_field = extra | json %}
{{ extra_field.venue_name }}
{{ extra_field.guest_code }}
{{ extra_field.meal_choice }}