We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Auto-populate fields button

Development and Programming

Red Gate Software's avatar
Red Gate Software
1 posts
15 years ago
Red Gate Software's avatar Red Gate Software

Hi guys,

I’d like to add a button to the ‘Edit Entry’ page which you can click to autofill the rest of the fields on the page, based on the content of the first. The data to fill the fields will come, in xml format, via an ajax call to a api webservice of a video hosting platform that we are using.

I don’t have a problem with the JS aspects of the button (I have it working fine on a blank test page) I was just wondering what the best way of adding it to the ‘Edit Entry’ page for the particular channel was…

Any advice would be appreciated 😊

Thanks!

Joe

Moved to Development and Programming by Moderator

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
15 years ago
Sue Crocker's avatar Sue Crocker

Welcome to the ExpressionEngine forums, Joe.

Excellent question, but better suited to the Developer forum. Moving there for additional community support.

       
Victor Michnowicz's avatar
Victor Michnowicz
95 posts
15 years ago
Victor Michnowicz's avatar Victor Michnowicz

I think you should be able to create a fieldtype for this kinda thing: http://ellislab.com/expressionengine/user-guide/development/fieldtypes.html

This fieldtype could check to see if an entry ID is set (so its not a new entry) and see if all the other fields you need to fill in are empty too. If these criteria are met, then you can run your JS. I’m not sure if this is the best route to go, however.

       
Red Gate Software's avatar
Red Gate Software
1 posts
15 years ago
Red Gate Software's avatar Red Gate Software

Sue - thanks for taking care of moving this question for me; I’ll know for next time 😊

Elvicmic - wow, that could be just what I’m looking for, I’ll try and follow a tutorial and let you know how I get on.

Thanks again both of you.

Joe

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.