I'm wanting to create a user macro that changes the parameters displayed in the macro browser based on the first few values chosen. For example, the first parameter might be a boolean asking if the user has an image, if they select true, then an input box will show up in the macro browser for them to put the url in. If they don't select true then the box is hidden.
Is this possible? If so how?
Yes, it should be possible.
You can get access to any of the fields in the macro browser dialog with this little snippet:
AJS.MacroBrowser.getMacroJsOverride("macrno-name").fields.string = { "field-name": function(param) { //do stuff }}; You could then possible bind an on change event to the field to take action against the second field.
The documentation you linked to was for creating plugins. Does this work on User Macros too? I'm wanting it for a User Macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.