PedroNL Posted August 9, 2016 Posted August 9, 2016 I am looking for a way that I can build a look up tool that works like this: I select 1 from a drop down and then it gives me a-c in a second drop down and I can do this 5 drop down deep. I would like to see if this tool can plug into Forum builder and topic template system also.
Adriano Faria Posted August 9, 2016 Posted August 9, 2016 You can do that if you use toggle. But if you want them dependent from each other, then you will need to use ajax. I mean: Select 1: manufacturer. Choose FORD. Then Select 2 appears listing only FORD cars, etc.
PedroNL Posted August 9, 2016 Author Posted August 9, 2016 Is toggle a plugin or built in? But yes that is what I am looking for...
Adriano Faria Posted August 9, 2016 Posted August 9, 2016 Toggle is part of the Select field. You can hide other fields and make them appear according to your selection. This is a built-in feature. But you need dynamic content, so you'll have to use Jquery + Ajax.
PedroNL Posted August 9, 2016 Author Posted August 9, 2016 So if I use jquery & Ajax is that something I would have to code into the content or build plugin? What would you charge for a plugin like that? If you did build a plugin, I would want it where the data could be used for all other plugins on the market and it would be searchable what ever content.
Adriano Faria Posted August 9, 2016 Posted August 9, 2016 See a toggle example: $form->add( new \IPS\Helpers\Form\Select( 'block_template_use_how', $useHow, FALSE, array( 'options' => array( 'use' => 'block_template_use_how_use', 'copy' => 'block_template_use_how_copy' ), 'toggles' => array( 'copy' => array( 'block_content' ) ) ), NULL, NULL, NULL, 'block_template_use_how' ) ); $form->add( new \IPS\Helpers\Form\Editor( 'block_content', $this->content, FALSE, array( 'app' => 'cms', 'key' => 'BlockContent', 'autoSaveKey' => 'block-content-' . ( $this->id ? $this->id : 'new' ), 'attachIds' => ( $this->id ) ? array( $this->id ) : NULL ), NULL, NULL, NULL, 'block_content_editor' ) ); It means that if the user selects the option COPY on the first select field, will make the second to appear. But the second hasn't a dynamic content, that's why you need jquery + ajax to query the database and make the proper records appear. I never did it on IPS4, sorry.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.