Let's suppose we want to create a BuddyForms form that allows us to create and edit events from the Front. Our form must have the fields: Title, Content, Start Date, End Record, Event URL. See Image 3.
The first thing we must do is create a BuddyForms form, which contains the necessary fields shown in Image 3. After this we must identify and set the fields that will be used to be integrated into the metadata, in our case, they will be: Start Date, End Date and Event URL.
To configure these fields we must first identify the metadata that we want to integrate, besides that, we must determine if these metadata are compatible with the integration. Then we must configure the slug of each field according to the meta_key of the corresponding metadata (see Image 4 and 5).
Note: It's important to mention that not all the metadata can be successfully integrated into BuddyForms. Depending on how these are being stored on the database, we will know whether or not we can integrate them into our form. In general, if metadata is stored as a serialized text string, it cannot be embedded, since each metadata must be associated with an input in the BuddyForms form.
In the case of the Start Date and End Date fields, besides slug, we must also configure the date format, so it matches the format used by the plugin when storing the information. The easiest way to identify the correct format is to inspect the wp_postmeta table for records that match the meta_key _EventEndDate or _EventStartDate respectively. In this case, the date formats must be configured in the next way:
Note: The above example may vary depending on the plugin version, also must be considered as a practical example, so, that may not be applicable in certain contexts. Relevant research and testing are recommended to determine whether this example applies to you or not.
Once we have established the appropriate slugs and we have configured the date format for the Start Date and End Date fields, we'll be ready to start creating or editing entries, if we need to add more fields, just repeat the aforementioned procedure.