Product Form
Support › MB Frontend Submission › Product FormResolved
- This topic has 10 replies, 3 voices, and was last updated 10 months ago by
[email protected].
-
AuthorPosts
-
May 29, 2024 at 10:07 PM #45566
[email protected]
ParticipantPlease 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
May 30, 2024 at 8:15 PM #45576Peter
ModeratorHello,
You can create a field group, then:
- add anumber
field with the ID_regular_price
to add the product price.
- add the field group ID to the frontend submission form.
- addthumbnail
value to the attributepost_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
June 2, 2024 at 6:29 PM #45597[email protected]
ParticipantThank 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
JohnJune 4, 2024 at 10:22 PM #45616Peter
ModeratorHello,
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 typeimage
so it will display "Choose file" button. You can use the field typesingle_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/2zwmuGYJune 14, 2024 at 8:06 AM #45641[email protected]
ParticipantThank 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
June 15, 2024 at 6:43 AM #45643Anh Tran
KeymasterIt's okay to post your question here 🙂
June 16, 2024 at 7:22 PM #45652[email protected]
ParticipantGreat
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 youJune 17, 2024 at 10:02 PM #45655Peter
ModeratorHello,
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/
June 18, 2024 at 10:14 PM #45664[email protected]
ParticipantThank you again
What I would like to know the function or the code that triggers the save action of the data when you submit.June 19, 2024 at 8:47 PM #45670Peter
ModeratorHello,
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.
June 22, 2024 at 10:37 PM #45687[email protected]
ParticipantI 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.
-
AuthorPosts
- You must be logged in to reply to this topic.