<p>Personally I don't have any experience with Free Form but have been using Sprout forms for quite some time now.</p>

<p>In Sprout forms your client can create entire forms or just add a couple of fields however you like it. The support on Sprout forms is decent aswell.</p>

<p>Plus sprout forms got email notifications aswell which might be interesting for your client.</p>

CC BY-SA 4.0
2018-11-29T14:46:19.153Z
Thanks Justin. Sounds good. Do you know if it's possible to create a list of entries submitted by a user? Users will need to log in to submit an assessment. They'll need to be able to submit multiple assessments and be able to view past entries. This was why I'd been exploring the native entry form route, as I know that'll be doable with standard twig tags.
GazCrane
CC BY-SA 4.0
2018-11-29T15:23:34.753Z
That is indeed possible although I haven't tried it personally with Sprout forms. I made something similar a while back in Craft 2 just with native craft so it should be possible to do so in 3. 

Where Sprout forms could be a good addition is by giving your client the oppertunity to create their own forms and just save them as an entry by user.
Justin Dekkers
CC BY-SA 4.0
2018-11-29T14:26:56.027Z
2018-11-29T14:26:56.027Z
Justin Dekkers
<p>Yes, you can do this without a plugin. You just need a frontend entry form, ala <a href="https://docs.craftcms.com/v3/dev/examples/entry-form.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/dev/examples/entry-form.html</a></p>

<p>Now if you want them to be able to add/remove fields, then instead of hardcoding the fields, you'll need to iterate through the fields that are in a particular field layout.</p>

<p>A way to do that is discussed here: <a href="https://craftcms.stackexchange.com/questions/2926/how-to-display-all-fields-belonging-to-current-entry/2928">How to display all fields belonging to current entry?</a></p>

CC BY-SA 4.0
2018-11-29T15:02:16.920Z
Thank Andrew. I did look at the solution you've linked to yesterday but it kept throwing errors:

`Calling unknown method: craft\elements\db\EntryQuery::getFieldLayout()` 
`Calling unknown method: craft\elements\db\EntryQuery::getFields()`

Those can definitely be used in front-end templates?
GazCrane
CC BY-SA 4.0
2018-11-29T15:19:27.227Z
Yeah that example is for Craft 2; you'll need to adapt it for Craft 3. You can try something like ```{% set fields = craft.app.fields.getFieldsByLayoutId(123) %}
{% for field in fields %}
{% endfor %}
``` -- swap in the layout id in question for the `123`
andrew.welch
CC BY-SA 4.0
2018-11-29T17:04:05.207Z
Cool. Thanks Andrew. The template's no longer throwing errors, but not actually rendering any content. However I think I'm on the right path now, so will do some more experimenting. May also take Sprout Forms for a spin.
GazCrane
CC BY-SA 4.0
2018-11-29T14:44:36.293Z
2018-11-29T14:44:36.293Z
andrew.welch
<p>We're in the process of scoping out an online assessment form to be build in Craft CMS. We need to give the client the ability to add, edit and remove questions (custom fields) and would ideally like to handle all entries through a channel, rather than a dedicated form plugin. The thing I'm struggling with at the moment is how to render the field layout for a channel in my template. <a href="https://docs.expressionengine.com/latest/channel/channel_form/examples.html#id3" rel="nofollow noreferrer">Expression Engine handles this using the {custom_fields} loop</a>. </p>

<p>Is there an equivalent template tag for Craft CMS? Or would we be better of working with Freeform or SproutForms?</p>

<p>Any help would be much appreciated. Thanks.</p>

<craft3><plugin-sproutforms><plugin-freeform><entry-form>
Does Craft have an equivalent of EE's Custom Fields loop for front-end entry forms?
# Does Craft have an equivalent of EE's Custom Fields loop for front-end entry forms?

(Asked by: username_0 on 2018-11-29)

We're in the process of scoping out an online assessment form to be build in Craft CMS. We need to give the client the ability to add, edit and remove questions (custom fields) and would ideally like to handle all entries through a channel, rather than a dedicated form plugin. The thing I'm struggling with at the moment is how to render the field layout for a channel in my template. [Expression Engine handles this using the {custom\_fields} loop](https://docs.expressionengine.com/latest/channel/channel_form/examples.html#id3).

Is there an equivalent template tag for Craft CMS? Or would we be better of working with Freeform or SproutForms?

Any help would be much appreciated. Thanks.

**Tags:** craft3, plugin-sproutforms, plugin-freeform, entry-form


---

## 2 answers

### Answer by username_1 on 2018-11-29. Score: 1

Personally I don't have any experience with Free Form but have been using Sprout forms for quite some time now.

In Sprout forms your client can create entire forms or just add a couple of fields however you like it. The support on Sprout forms is decent aswell.

Plus sprout forms got email notifications aswell which might be interesting for your client.

> **Comments:**
> **username_0**: Thanks Justin. Sounds good. Do you know if it's possible to create a list of entries submitted by a user? Users will need to log in to submit an assessment. They'll need to be able to submit multiple assessments and be able to view past entries. This was why I'd been exploring the native entry form route, as I know that'll be doable with standard twig tags.  
> **username_1**: That is indeed possible although I haven't tried it personally with Sprout forms. I made something similar a while back in Craft 2 just with native craft so it should be possible to do so in 3.   Where Sprout forms could be a good addition is by giving your client the oppertunity to create their own forms and just save them as an entry by user.  

---

### Answer by username_2 on 2018-11-29. Score: 1

Yes, you can do this without a plugin. You just need a frontend entry form, ala <https://docs.craftcms.com/v3/dev/examples/entry-form.html>

Now if you want them to be able to add/remove fields, then instead of hardcoding the fields, you'll need to iterate through the fields that are in a particular field layout.

A way to do that is discussed here: [How to display all fields belonging to current entry?](https://craftcms.stackexchange.com/questions/2926/how-to-display-all-fields-belonging-to-current-entry/2928)

> **Comments:**
> **username_0**: Thank Andrew. I did look at the solution you've linked to yesterday but it kept throwing errors:  `Calling unknown method: craft\elements\db\EntryQuery::getFieldLayout()`  `Calling unknown method: craft\elements\db\EntryQuery::getFields()`  Those can definitely be used in front-end templates?  
> **username_2**: Yeah that example is for Craft 2; you'll need to adapt it for Craft 3. You can try something like ```{% set fields = craft.app.fields.getFieldsByLayoutId(123) %} {% for field in fields %} {% endfor %} ``` -- swap in the layout id in question for the `123`  
> **username_0**: Cool. Thanks Andrew. The template's no longer throwing errors, but not actually rendering any content. However I think I'm on the right path now, so will do some more experimenting. May also take Sprout Forms for a spin.  

---

