Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Numbered Posted June 6, 2018 Posted June 6, 2018 Example: $form->add( new \IPS\Helpers\Form\Radio('something', null, true, [ 'options' => [ 'opt1' => 'val1', 'opt2' => 'val2', ], 'toggles' => [ 'opt1' => ['text_container'], 'opt2' => ['text_container'] ] ]) ); $form->add(new \IPS\Helpers\Form\Text('text_input_id', null, true, [ 'placeholder' => \IPS\Member::loggedIn()->language()->get('text_input_placeholder'), 'minLength' => 1, 'maxLength' => 14, ], function ($val) { // not interesting }, null, null, 'text_container')); Can i set different placeholder on text input depending on current radio option selected? Or i can do it only with javascript way? Thanks!
Joy Rex Posted June 6, 2018 Posted June 6, 2018 Since you're talking about changing the placeholder text based on the current radio button choice, jQuery/Javascript would be the only way to do that as the user changed the radio button selection.
Numbered Posted June 6, 2018 Author Posted June 6, 2018 22 minutes ago, Joy Rex said: Since you're talking about changing the placeholder text based on the current radio button choice, jQuery/Javascript would be the only way to do that as the user changed the radio button selection. Thanks for support my assumption. Already start doing in this way
Recommended Posts
Archived
This topic is now archived and is closed to further replies.