Adriano Faria Posted 22 hours ago Posted 22 hours ago How can I add a $form->addHeader on a UINode extension?
teraßyte Posted 21 hours ago Posted 21 hours ago Since the extension specifically calls $form->add() on the returned elements we also can't add messages, dummy rows, HTML rows, buttons, etc. 🙄 Adriano Faria 1
Adriano Faria Posted 21 hours ago Author Posted 21 hours ago (edited) @Esther E. @Matt We need to be able to do the minimum, at least. Adding fields only isn’t enough. Edited 21 hours ago by Adriano Faria
Esther E. Posted 21 hours ago Posted 21 hours ago Please post this as a bug. I think I'll allow a string to be included in the array (so for example, to add a header you'd just call the header template directly, same as what $form->addHeader() does. Would that work? Adriano Faria 1
Adriano Faria Posted 21 hours ago Author Posted 21 hours ago For the header, yes. HTML message is required sometimes too.
Esther E. Posted 21 hours ago Posted 21 hours ago Just now, Adriano Faria said: For the header, yes. HTML message is required sometimes too. Any template would work. 😉 Adriano Faria 1
teraßyte Posted 21 hours ago Posted 21 hours ago How about adding buttons to the forms? That won't work with a template since I'd need the button near the save one. 🤔 Adriano Faria 1
Esther E. Posted 19 hours ago Posted 19 hours ago 1 hour ago, teraßyte said: How about adding buttons to the forms? That won't work with a template since I'd need the button near the save one. 🤔 You're pushing it..... 😂 Not sure how simple that would be. Unlikely I'll add it now.
teraßyte Posted 19 hours ago Posted 19 hours ago 13 minutes ago, Esther E. said: You're pushing it..... 😂 Not sure how simple that would be. Unlikely I'll add it now. More like I have a client with a custom modification that does exactly that... Guess I'll have to do some JS magic tricks for now. 😹
Kirill Gromov Posted 19 hours ago Posted 19 hours ago Don't forget form tabs! https://invisioncommunity.com/forums/topic/480849-form-tabs/
teraßyte Posted 19 hours ago Posted 19 hours ago 2 minutes ago, Kirill Gromov said: Don't forget form tabs! https://invisioncommunity.com/forums/topic/480849-form-tabs/ You can use setPosition() on the fields to create a new tab. That's already covered at least. 🙂
Kirill Gromov Posted 18 hours ago Posted 18 hours ago 37 minutes ago, teraßyte said: You can use setPosition() on the fields to create a new tab. That's already covered at least. 🙂 Have you tried it? Can you show me some code?
teraßyte Posted 18 hours ago Posted 18 hours ago (edited) Here's an example: public function formElements() : array { $newFields = array(); # Create fields $newFields['test1'] = new Text( 'test1' ); $newFields['test2'] = new Text( 'test2' ); # Call setPosition for each field $newFields['test1']->setPosition( NULL, 'TAB' ); $newFields['test2']->setPosition( 'test1', 'TAB' ); return $newFields; } You have to call setPosition() for each field to add a new tab, but it's possible. Edited 18 hours ago by teraßyte Kirill Gromov and konon 1 1
beats23 Posted 13 hours ago Posted 13 hours ago 5 hours ago, Esther E. said: You're pushing it..... 😂 Can I push it as well 😍. Can we also have a theme template hook target for the Blog template "Section class, i-padding_3"? I would like to add the "Add message green box" below the blog post and not at the top of page, then hide the original message box with CSS. konon 1
Recommended Posts