Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Difficulty in utilizing data #1520

@Mmzkh

Description

@Mmzkh

Hello and good morning, first of all, thank you for taking the time to respond

I am a WordPress theme author and I was trying to use cmb2 as expected. Let me explain the situation

I was defining a shortcode in my theme to add my own custom player that I was designing to the theme, but the problem is that audio and video players, and in fact the <video> and <audio> tags, have many settings, such as source files and various features that can be extended to them, such as whether the controls are displayed or not, and in general the shortcode that the user has to write was very long. So I came and used cmb2 to define fields so that the user can fill them in and receive the shortcode and use it on the writing page. So I came and defined the fields one by one, but I prevented all the fields from being saved in the database because I didn't need them. In fact, I just wanted the user to fill in the fields and I At that moment I take the data entered in the field and paste it into my shortcode structure. My problem is that I need to find the data entered in these fields! See, I noticed that your library, when we enter data in a field, first stores it in the browser's dom and when we save the post, it dumps what was in the trap into the database. So far everything was fine because I was getting the content that was in the dom in a way with js and using it in my code. But the problem is that when I decide to select a file from the WordPress media, what I noticed is that the content that is selected from the WordPress media with a button with the class cmb2-upload-button is not saved in the trap. So I can't access it unless the user copies the field content once and reposts it! I want to know where the content that is selected from the WordPress media and put into the fields is kept before being stored in the database!!! If it is not in html, not in dom, and not in the database, then where is the data in these fields before saving and publishing or updating the content so that I can find and use it before it is stored in the database

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions