Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 196 through 210 (of 221 total)
  • Author
    Posts
  • in reply to: enqueue_assets in block editor only #32116
    Nicholas CoxNicholas Cox
    Participant

    thanks! worked for me

    in reply to: Add Metabox Post Meta to Custom API Endpoint #31547
    Nicholas CoxNicholas Cox
    Participant

    Hi

    Ok thanks for the links, it worked perfectly.

    Nick

    in reply to: Custom Field Type Issues #30724
    Nicholas CoxNicholas Cox
    Participant

    ok thanks, I will use this then https://docs.metabox.io/extensions/mb-frontend-submission/#form-actions

    in reply to: Metabox Custom Table Model and CRUD Query #30723
    Nicholas CoxNicholas Cox
    Participant

    ok thanks, I will use the WPDB class then.

    in reply to: basic metabox block and loads of http requests? #30722
    Nicholas CoxNicholas Cox
    Participant

    Hi

    Thanks for the quick response. You are right, thanks for this, I assumed as I was not calling the post content and just the title, that in theory, it would not load all the CSS/JS.

    This has now been resolved.

    Thanks

    Nick

    in reply to: basic metabox block and loads of http requests? #30694
    Nicholas CoxNicholas Cox
    Participant

    Just an update, I was up late last night and forgot that I had a script in my footer.php page which was being called (I left in in there as I was doing a test). This is the bit of code causing all of those CSS/JS to be loaded, but not sure why?

    $request = WP_REST_Request::from_url( 'http://localhost/freestuffgroup/wp-json/wp/v2/posts' );
    $request->set_method( 'GET' );
    $response = rest_do_request( $request );
    $jsonStr = json_encode($response->get_data());
    //var_dump( $jsonStr );
    

    Thanks

    Nick

    in reply to: basic metabox block and loads of http requests? #30693
    Nicholas CoxNicholas Cox
    Participant

    Hi

    Sorry it is was clear before I uploaded it. Here is a new image of the inspector tab. You can see all I am calling is one metabox block and nothing else.

    inspector

    Also I have no other plugins installed, just my own plugin (Drip Create Plugin). If I remove the metabox block all of the JS/CSS are no longer called. I have created a test page with only one metabox block and no other information, see below.

    no-metabox-block

    Thanks

    Nick

    in reply to: Custom Field Type Issues #30258
    Nicholas CoxNicholas Cox
    Participant

    Hi

    I am not looking to upload the images to WordPress. But to send the base64 data to a 3rd party API after the user submits the form. So I just need to be able to execute a custom function of my own on form submission. Is this possible?

    1. User fills in the form
    2. User uploads images which are read by the filereader (FileReader.readAsDataURL())
    3. User Submits the form
      3a. Execute a function to send all base64 strings to an API

    sorry I was not very clear before. Hope the above helps?

    Thanks

    in reply to: Custom Field Type Issues #30236
    Nicholas CoxNicholas Cox
    Participant

    Hi

    Thanks for the information. I have managed to get the sanitize callback working. There is just one more thing I need to do.

    I need to be able to upload the images to a custom folder when the user submits the form. Is there a hook or callback I can use to initiate before sanitization?

    Thanks

    Nick

    in reply to: Custom Post Tables & Metabox #30200
    Nicholas CoxNicholas Cox
    Participant

    Hi, I noticed the Trello card has now been marked as complete. When is the next release of updates which includes this? https://trello.com/c/82y4SLve/10-custom-table-create-content-table

    thanks

    in reply to: Rest API and Metabox fields show/hide #30097
    Nicholas CoxNicholas Cox
    Participant

    great thanks, I'll check out the link.

    in reply to: Ajax Search and filter template #30019
    Nicholas CoxNicholas Cox
    Participant

    thanks for the link, very useful.

    in reply to: Ajax Search and filter template #29974
    Nicholas CoxNicholas Cox
    Participant

    Also I have been checking out using custom API endpoints and using them for search and filter posts. I know Metabox adds fields into the API as I have the addon installed. What are your thoughts on using the wordpress rest api over admin-ajax.php?

    in reply to: Custom Field Type Issues #29831
    Nicholas CoxNicholas Cox
    Participant

    forgot to mention, how to I pass the value e.g. file1.jpg to sanitize it before saving the value to the database?

    in reply to: Custom Field Type Issues #29830
    Nicholas CoxNicholas Cox
    Participant

    Hi

    1. thanks for confirming.
    2. I'm not exactly sure what you mean, how to I get Metabox to save the input field value? e.g. file1.jpg, file2.jpg, file3.jpg?

    Thanks

    Nick

Viewing 15 posts - 196 through 210 (of 221 total)