Support Forum
Support › MB Frontend Submission › Product FormResolved
Please understand that I am teaching my self.
I have been able to render a frond form to enter new products and it works. However I would like to include the price for the product, and the featured image. The form that I have works in woocomerce but I cant figure how to include the price in that form.
Here is the test page
https://nmcellars.com/test/
Thank you for any help
Hello,
You can create a field group, then:
- add a number
field with the ID _regular_price
to add the product price.
- add the field group ID to the frontend submission form.
- add thumbnail
value to the attribute post_fields
to add a featured image.
the frontend shortcode looks like this
[mb_frontend_form id='product-meta' post_fields='title,content, thumbnail' post_type="product"]
screenshot of the field group https://imgur.com/z4Q9Nk3
Following the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#field-order
Thank you for you assistance.
I have manage to render the price in the same form by using this in the
shortcode: [mb_frontend_form id='product-price,product-information' post_fields='title,content,thumbnail']
it is working for the most part, but I dont know if this the correct way? Are you aware of a video or step by step. that directions to the matter
Confusing step: "Add post fields as normal custom fields to your meta box settings, like this:" I am not able to understand were to enter as normal custom fields in the meta box settings. I am using the oxygenbuilder in this matter if that makes any difference. But I can see if I learn the documentation method I will be able to pick and choose the desired fields.
The form in the builder preview renders properly "+ Add Media" , "Add New producer", "Add new country" etc
however in the regular view the "+ Add Media" renders like "Choose File" and all the: "Add New producer", "Add new country" etc they are not available. Please see attached images: https://imgur.com/a/IYdDcdH
here is the new page https://nmcellars.com/test/
if you know of instructional video how to do "mix post fields with custom fields" that will be helpful
Thank you for your time
John
Hello,
I am not able to understand were to enter as normal custom fields in the meta box settings
It is the custom fields that you added to the field group product-price
, product-information
.
however in the regular view the "+ Add Media" renders like "Choose File"
Each field type will have a different add
button text. You are using the field type image
so it will display "Choose file" button. You can use the field type single_image
and recheck this.
all the: "Add New producer", "Add new country" etc they are not available
You are using the field type taxonomy
, please make sure the option "Add new" is enabled when you create the custom field, screenshot https://imgur.com/2zwmuGY
Thank you so much for your teachings. I have learn a lot thank you.
If I can ask: shall I post a question about styling the form here or create another thread?
Thank you for you
It's okay to post your question here 🙂
Great
I would like to style the submit button to a floating button, as you can see this is long form and some information might not be available at the time entry and there is no need to scroll to the end.
thank you
Hello,
You can create your own custom CSS and JS code to make the submit button float. Following this article https://www.linkedin.com/pulse/creating-floating-button-css-javascript-step-by-step-chowdhury-proma/
Supporting the custom code is beyond our scope, please refer to this support policy https://support.metabox.io/topic/support-policy/
Thank you again
What I would like to know the function or the code that triggers the save action of the data when you submit.
Hello,
It uses the standard functions of WordPress wp_insert_post(), wp_update_post() to create/update the post. You can take a look at the file /mb-frontend-submission/src/Post.php line 54-70.
I wish I could utilized the function " /mb-frontend-submission/src/Post.php line 54-70" but I am new to this and a lot of knowledge to go about it hope one day.
I choose to modify the "submit" button via Css and works quite well.
Thank you for your time and great support that you have provided.