Support Forum ยป User Profile

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • DanDan
    Participant

    Thanks for the response. The issue seems to have gone away (I'm trying to figure out how).

    in reply to: โœ…Front-end validation messages #10885
    DanDan
    Participant

    Anh- I'm having similar issue as the OP in terms of validation. I've tried the validation hook and also the normal jquery validation syntax, but nothing seems to work for a few field types. Notably, for me, is image select, which might be similar to OP's radio button issue.

    I already do a lot of stuff at rwmb_frontend_insert_post_data before wp_insert_post, so my workaround is to check then to see if its empty, and if so keep the post in draft and set up a validation-like message on the redirect when the (nearly) completed post appears again on the other side. But I try to avoid what I term "wordpress workarounds" whenever I can ๐Ÿ™‚

    thanks!

    DanDan
    Participant

    yeah the switch blog part is the kicker. Simply switching between CPTs in the same subdirectory is easy (as long as it is the initial insert post). I know it can be done (I'm doing it now), just not on the scale I'm describing here. I'll look at your suggestions, but it'll be fine either way. thanks

    DanDan
    Participant

    Sure- so since my website is going to be very data heavy, I made a decision to strategically parse custom posts into multiple custom post SQL tables, which I've done through created a multisite with subdirectories. It works well in testing, using switch_to_blog and so on. Basically a long-term decision based on application.

    So:
    Step 1 - User enters data in a centralized form which will become a CPT. However which specific CPT is unknown until they say what type of "x" it is.
    Step 2- The submitted post is quickly hooked (like I've done before). Which CPT is ends up at is based on the user's selection.

    Normally I could do my previous code and it would just save to the right CPT. However with what I'm doing here, I have to keep it in whatever blog has the CPT until it is saved, and then "restore_current_blog".

    I can manually hook it and save each type with wp_insert_post and then restore_to_blog, but I was trying to avoid that.

    So, in summary, Post written --> Hooked before save -->CPT determined and sent to the right blog (subdirectory)-->saved --> restore_to_current_blog

    Hope that cleared things up. I know it is a very unique set of requirements, and I don't anticipate something that will work other than me wp_inserting myself. thanks!

    DanDan
    Participant

    quick update on the above- it actually doesn't save to the CPTs of the subdirectory, just the basic post type. Interesting. Looks like I'll need to manually wp_insert_post them.

Viewing 5 posts - 1 through 5 (of 5 total)