0

I'm using Safecracker to edit entries for the Channel Foo.

Suppose I have another Channel Images which has a filename field and a relationship field that points to Channel Foo.

Essentially, a Channel Foo entry can have 0 or more "images"(1-to-many)

Now when I am editing entries, I may want to add new images to a Channel Foo entry.

Is there a way to do it in Safecracker?

4
  • Just a suggestion, why not using a Matrix field for your images?
    – pvledoux
    Jan 24, 2013 at 13:09
  • @pvledoux It is because I want to use my own custom markup for displaying the images. Matrix only displays predefined markup. Jan 25, 2013 at 1:10
  • 1
    Actually you can, see this post: expressionengine.stackexchange.com/questions/210/…
    – pvledoux
    Jan 25, 2013 at 8:56
  • This is what I was referring to in comments on my answer. My recommendation to use AJAX is to enable the ability to add fields within your Safecracker form, and create corresponding entries on the backend, fetching the new IDs. Jan 25, 2013 at 20:58

1 Answer 1

1

Why not have a Playa field in Foo that allows you to choose multiple Images entries? (Instead of relating Foo to Images)

2
  • I'm trying to do this in SafeCracker, not EE's CP. Jan 25, 2013 at 3:23
  • You can use Playa fields in Safecracker. There's just a limit to how much you can style them. You can also use AJAX to interact directly with the Matrix database table and use Matrix to add/remove multiple entries to your Foo entry. But I think you need to shift the 1:many relationship onto Foo. Jan 25, 2013 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.