1

This Fieldtype will need to allow the "profile admin interface" created from the API to appear on the Entry Publish/Edit page. The only thing that I was told I'll need to add to the script (as a variable) is the current entry's ID. I tried to find a fieldtype I could use as a reference and I see fieldtypes like Color Picker http://devot-ee.com/add-ons/color-picker that may be similar but that one doesn't load the entry ID into the script as a variable. I don't believe I'll need to store anything in the database, because the script will send any selections by the author to the remote site to store (associated to the entry ID and an API key from https://electnext.com/) so hopefully it won't be that difficult.

I'm mainly a front-end coder so this is a bit out of my comfort zone, but I'm fairly confident I can pull it off with some guidance.

Thanks!

1 Answer 1

1

I believe it is stored in a hidden form input on the page, like so:

<input type="hidden" name="entry_id" value="123" />

So you could grab it with JQuery with something like this:

var id = $('input[name=entry_id]').val();

It should also be in the query string of the URL as a get variable if you wanted to go that route, but finding it on the page would probably be more direct.

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.