Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
#FormBuilder from payload
31 messages · Page 1 of 1 (latest)
Please i am waiting for help.....
I was able to create the form but there is no way i can use it on the page
@quasi brook This doesn't provide enough information to help you out. Can you share some code? Any errors in the web console or terminal?
I am trying to use the form by passing it inside a new page i want to create on my admin dashboard but it is not showing. I want to make sure my websites have Contact Us form but anytime i input the formblock and save it. I will click on the new page on my website but it will not bring any form.
Good Morning Everyone, i am still hoping i can get a help on this....I have followed all instructions so far....Whenever i click on contact on my websites nothing show...Just blank...I do not know why as i have created form and attched it to the Contact page in payload dashboard
Hey @quasi brook what guide are you following to get the form component setup on the frontend?
I follow payloadcms instruction on payload official sit
site i meant
@daring mulch @pallid coyote Please i need you guys help
Hey @quasi brook , it seems like the problems you are facing are firmly in your code. While we try to help out as much as we can, the information you're providing isn't enough information to help out.
- What does your code look like for the page?
- What API call is it making?
- Any errors in console or terminal?
Things like these should be provided when asking questions.
There are my component structure on the frontend
Which i get from payload official site
It does not throw any error
@pallid coyote
Hey @quasi brook is this the guide you followed?
https://payloadcms.com/blog/create-custom-forms-with-the-official-form-builder-plugin
Yes that is what i follow
And i am able to get form on my admin dashboard
But all the form i create...I can't use it
@daring mulch i click on creating new page on the admin dashboard then on the hero, i click on low impact and write contact us. Then on the content of the page, i click add layout in which i choose form block . Then i click on the form i had created. Then publish the page on my navbar but whenever i click on contact, it just shows contact us and not the form
I hope you can understand me with this explanation
Maybe the question should be how am i gonna used the form that is being created in my payload admin dashboard
This is how my page config looks like....export const Pages: CollectionConfig = {
slug: 'pages',
admin: {
useAsTitle: 'title',
defaultColumns: ['title', 'slug', 'updatedAt'],
preview: doc => {
return ${process.env.PAYLOAD_PUBLIC_SERVER_URL}/api/preview?url=${encodeURIComponent( ${process.env.PAYLOAD_PUBLIC_SERVER_URL}/${doc.slug !== 'home' ? doc.slug : ''}, )}&secret=${process.env.PAYLOAD_PUBLIC_DRAFT_SECRET}
},
},
hooks: {
afterChange: [revalidatePage],
afterRead: [populateArchiveBlock],
},
versions: {
drafts: true,
},
access: {
read: adminsOrPublished,
update: admins,
create: admins,
delete: admins,
},
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'publishedOn',
type: 'date',
admin: {
position: 'sidebar',
date: {
pickerAppearance: 'dayAndTime',
},
},
hooks: {
beforeChange: [
({ siblingData, value }) => {
if (siblingData._status === 'published' && !value) {
return new Date()
}
return value
},
],
},
},
{
type: 'tabs',
tabs: [
{
label: 'Hero',
fields: [hero],
},
{
label: 'Content',
fields: [
{
name: 'layout',
type: 'blocks',
required: true,
blocks: [CallToAction, Content, MediaBlock, Archive, FormBlock],
},
],
},
],
},
slugField(),
],
}
I tried to remove hero field but it throws error...I want to make sure pages accept form but it is colliding with my hero
The problem i am having right now is hero section on the page....I can't create any page without hero and i should be able to pick between hero and form
I think the problem for me is how to configure page config to accept forms without complicating hero section
@daring mulch @pallid coyote Still waiting for help please
Hi @quasi brook , please ease up on non-urgent tagging.
If you think this is a bug, feel free to write up an issue.
I tried to remove hero field but it throws error
What error?
Whenever i wanted to create a new page on payload admin...It will always show hero or content...I tried putting the form on the content and just put words on the hero section in create new page but it won't show