Numbered Posted June 6, 2018 Share 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! Link to comment Share on other sites More sharing options...
Joy Rex Posted June 6, 2018 Share 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. Link to comment Share on other sites More sharing options...
Numbered Posted June 6, 2018 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.