Open bobbingwide opened 9 years ago
Additionally you can insert a shortcode into a post before any required attributes have been added which results in something like this:
[shortcode ]
Would be nice if the same 'required' parameter for a UI field also disabled in the Insert Element button until all required parameters were filled out.
+10
Yes!
Prior to using Shortcake UI, I would do all the error checking inside the shortcode's code and output an HTML comment to help somewhat. However, returning an HTML comment in Shortcake Preview or WP Editor makes the shortcode not appear at all and displays an odd-height space.
If I return '';
instead of returning an HTML comment, Shortcake displays the shortcode text but without a preview (its own lite version of an error message).
Allowing to mark one or more attributes as required would be an effort toward giving user an idea of the essential settings and lessen the need for HTML comment sort of error message 'helping'.
+1
+100. We badly need this to make some of our shortcodes work in a team environment (without writing a 100-page guidebook)
Some shortcodes may operate successfully with no parameters whatsoever. Others require certain parameters to be set.
It would be nice if the preview did not get invoked if the required parameters were not defined.