Hi,
I am trying to add an edit form using Entity_type/entity_bundle. Everything seems to be working when i enable "entity_type add/edit form", I can modify and apply anything on the page.
However when I try to apply this to a new custom page, the variant behaviour changes and adding a new field form, only displays "Entity info." string instead of a beautiful form field...
Do you know what could be the reason of this ?
Usually when I use a node, I just need to add in contexts > RELATIONSHIPS > "Node edit form from node", which is quite easy.
Maybe having the same could be great ? (and fast to add on the custom page too)
Thanks
Comment | File | Size | Author |
---|---|---|---|
#13 | Edit_form_on_page_manager__custom_page-2799943-9___3.patch | 11.94 KB | cifren |
#12 | Edit_form_on_page_manager__custom_page-2799943-9.patch | 2.06 KB | cifren |
#9 | Edit_form_on_page_manager__custom_page-2799943-9.patch | 0 bytes | cifren |
Comments
Comment #2
cifren CreditAttribution: cifren commentedI created the part myself, I will be sharing it soon.
Comment #3
mnico CreditAttribution: mnico at TIFON commentedThank you ;).
The context "ECK edit form" does not exist. If you created the context would be a very good contribution :)
Regards
Comment #4
mnico CreditAttribution: mnico at TIFON commentedComment #5
cifren CreditAttribution: cifren commentedhttps://cifrenblog.wordpress.com/2016/09/16/create-your-own-edit-form-on...
Here is the tutorial how to create it, it is working on my website as a custom module.
On the tutorial it is missing the relationship part, but it is already available on the Github sources.
I will create the post next week to explain how I did it the relationship part.
Everything is on the post.
Let me know if you have difficulties to implement it.
Comment #6
mnico CreditAttribution: mnico at TIFON commentedWow that's cool! I recommend that you create and upload a patch here, making your contribution relates to your profile drupal.org.
Here we can make some changes later if necessary.
Regards
Comment #7
cifren CreditAttribution: cifren commentedCan you explain how to do it ? I'll do it on Friday (Blog day !)
Comment #8
mnico CreditAttribution: mnico at TIFON commentedExists a post about that https://www.drupal.org/node/707484
When you have the patch, you must upload it in a new comment in the "Files" field.
Good luck ;)
Comment #9
cifren CreditAttribution: cifren commentedHere the patch, I tested it on clean drupal 7 with eck_pm and suite. It was working.
Comment #10
mnico CreditAttribution: mnico at TIFON commented@cifren for some reason the file is empty.
Make sure to create a new branch from 7.x-1.x, then apply your changes and commit it in your new branch and run git diff 7.x-1.x > my_patch.patch
regards
Comment #11
mnico CreditAttribution: mnico at TIFON commentedComment #12
cifren CreditAttribution: cifren commentedMy bad...
This new one, should be better.
Comment #13
cifren CreditAttribution: cifren commentedSorry again, i didn't commit before sending it so, the previous diff file was missing lines.
Comment #14
cifren CreditAttribution: cifren commentedHave you been able to implement it ?
Comment #15
mnico CreditAttribution: mnico at TIFON commentedSorry @cifren. I have not had enough time to review it. I will try to test it this weekend.
Regards
Comment #17
mnico CreditAttribution: mnico at TIFON commentedHello, I reviewed the patch. I have made some changes:
1. I committed only the context "edit form" (nice work). About relationships, i don't understand how this works.
2. I fixed some code style (about this see https://www.drupal.org/docs/develop/standards/coding-standards).
3. I created the argument plugin for "edit form". You can create a panel page using a path like this: "my-path-entity/%entity-edit-form" and the argument %entity-edit-form can be the context "edit form". I don't know if this is what the relationship plugin try to do. You have a post about this so i will try to read it to understand the relationship plugin.
Regards
Comment #18
mnico CreditAttribution: mnico at TIFON commentedCan you try the latest commit and tell me if it is enough or if I would add the other components?
Comment #19
spasem CreditAttribution: spasem commentedThis was exactly what I needed for one of my sites.
However, I just tested this feature and works fine with the form being enabled but I am having an issue with supplying url arguments to the form. I am using the entityreference prepopulate module to populate ECK fields but the form is not prepopulating when using a custom page. Prepopulating works fine when the standard ECK edit or add form is enabled in page manager but when I create my own custom page with the edit_form context, prepopulating does not work. Am I missing something?
Thanks
Comment #20
apaderno