Take the 2-minute tour ×
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It's 100% free, no registration required.

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?

share|improve this question
    
Just a suggestion, why not using a Matrix field for your images? –  pvledoux Jan 24 '13 at 13:09
    
@pvledoux It is because I want to use my own custom markup for displaying the images. Matrix only displays predefined markup. –  arvinsim Jan 25 '13 at 1:10
1  
Actually you can, see this post: expressionengine.stackexchange.com/questions/210/… –  pvledoux Jan 25 '13 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. –  Mark J. Reeves Jan 25 '13 at 20:58
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
I'm trying to do this in SafeCracker, not EE's CP. –  arvinsim Jan 25 '13 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. –  Mark J. Reeves Jan 25 '13 at 12:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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