logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$40
How to do this complex embedded forms?

I am going crazy with this embedded forms and I would like to see if someone can do it.

The problem is that it involves 4 different Tables/Forms with 1:1, 1:n and n:n relations.

I am also not sure how to do the thing to add creation form, for multiple items from within the form.

This is why I am offering a large price for this.

The specifics:

This is for a rules management module.

A rule is associated to a campaign.
A rule can have one or many commands.
Each command is linked to one or many Events (or Actions)
Each Event then is associated to a Campaign or to a Template.

I need to be able from a single form to edit those relations, with the possibility of adding only one rule at a time. However I should be able to add/modify/delete multiple Commands. Then I should be able to create the templates if needed.

I am attaching the schema and fixture on pastebin for easy reading.

Thank you.

Schema: http://pastebin.com/9J4SNU0n
Fixture: http://pastebin.com/QZxP0pTu


Samuel | 03/07/10 at 1:21pm Edit


(1) Possible Answers Submitted...

Note: Samuel felt their question was unanswered, so we granted them a refund.

Note: Samuel requested a refund. They offered no explanation.

If no one challenges a refund request, then they are automatically granted and proccessed after 48 hours. Admins of this site only review refund requests if someone challenges the request. If you are curious about how we handled previous refund requests, you may read over all refund requests and their challenges.

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    03/07/10
    3:37pm
    Gert Findel says:

    Each Event then is associated to a Campaign or to a Template. ??

    1. If you have campaign->rules->commands->events.. why do you need event->campaign again?
    2. Do you need new Commands for each new Rule or do you need to relate new rules with olds commands? Or Both?
    3. Same as 2, but for Commands and Events.

    • 03/07/10 4:46pm

      Samuel says:

      This is to create rules for a Text message system.

      1. The entire concept is that a rule will have one or both of two final effects:
      a. Add/Remove/Update SOMETHING from a campaign. (Campaign is like an addressbook, so add/remove/uodate a contact to an address book for example or add information to a member of the address book)
      b. Reply with a Template

      So you can have 2 campaigns, and the rule will be: Rule for Campaign A: If inbound message from anyone, then Add contact to Campaign B <--


      2. New commands for each rule. So Rule #1 may have Commands A,B and Rule #2 Commands A`, B` (different)

      3. Yes. New for each.

      Examples of the concept:

      Rules 1 for Campaign 1
      Command: "Add me!",
      Events:
      Add to Campaign 2
      Remove from Campaign 1
      Reply Template Thank you.
      Command "Remove me from all!",
      Events:
      Remove from Campaign 1
      Remove from Campaign 2
      Reply Template Removed.

      Rule 2 for Campaign 1
      Command: "Yes!"
      Events:
      Reply Template: You said yes
      Command: "No"
      Events:
      Reply Template: You said no



      I hope this clarifies it.

    • 03/08/10 10:07am

      Samuel says:

      Are you attempting to do this? :) Thank you.

    • 03/08/10 10:23am

      Gert Findel says:

      yesterday before church i left it as you can see in this link
      Is something like this what you want?
      ( I know there is something missing.. the possibility of inserting new Events in the commands, just as I did with the commands in the rule)

    • 03/08/10 10:33am

      Samuel says:

      Yes. That is correct. Of course, implementing the Event and template part too.

      (btw Adding new command for a new rule seems not to be working. only works for existing rules) . If it is a requirement to do in 2 steps to make it easier, I don't mind, something such as, Click Save on the rule, before displaying the command and event section.

      Thank you.

    • 03/08/10 10:34am

      Gert Findel says:

      or do you want to be able to select previously created commands for a rule? or previously created events for a command? If not, I don't understand why CommandEvent is N to N.

    • 03/08/10 11:06am

      Samuel says:

      I am thinking.. you may be right... I may not need n:n ... Each rule is individual.. each command belongs to only one rule, and the events belong to that command.

      The only thing in common, is that the Events can only be named Add, Remove, Modify and Reply, but I guess that can be controlled by doing a Choice with those commands only.

      Ok, go ahead and modify the schema to reflect this... Thank you for noticing that.

    • 03/08/10 7:17pm

      Gert Findel says:

      I am back from work, I've uploaded a new version a my solution in the same link as before

      I'm almost there =)

    • 03/09/10 12:27pm

      Gert Findel says:

      I was complicated with the ajax, so I started from scratch and did what you see in the folowing link.. thats much easier, and means only 10 minutes
      Is that what you need?

      I believe it's all you need and is based in a plugin (ahDoctrineEasyEmbeddedRelationsPlugin), so its means almost no configuration and is very easy to understand and modify, specially the style.

      PS: You still have to change your actual schema and fixture tio get it to work properly

    • 03/09/10 12:52pm

      Samuel says:

      Gert, thank you for the work so far.

      But its still not working.. :(

      Saving generated an error. I didnt test anything else.

      Also there is no option to add more CommandS or more EventS

      Remember one rule can have multiple commands, and each command can have multiple events.

    • 03/10/10 10:52pm

      Samuel says:

      Gert.. any luck with this?

This question has expired.





Current status of this question: Refunded



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.