The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dropdown box auto populates other input fields - Help
#11
Thanks... much appreciated...
  Reply
#12
I have to work on this for one of my scripts I am coding so I will see what I can figure out and I'll get back to you!
  Reply
#13
@Brandin Any Luck

@Muadmin - Do you have any ideas here?
  Reply
#14
I've been trying a couple things and figuring out what is going to work best. I am struggling to figure out the solution to populate one from another. It may be a few days before I figure something out, sorry.
  Reply
#15
you could use ajax for that, i use this for form submission but you could adapt it for use with on change, your php logic can go into a separate php file making sure to incl. init.php and $db = DB::getInstance();

<pre>
Code:
$('#form-id').submit(function(e){
  
        e.preventDefault(); // Prevent Default Submission
      
        $.ajax({
          url: 'path-to-php-file',
          type: 'POST',
          data: $(this).serialize(), // it will serialize the form data
          dataType: 'html'
        })
        
        .done(function(data){ // If success display alert
           alert('Form Submit Successful ...');
        })
        
        .fail(function(){ // If fail display alert
            alert('Form Submit Failed ...');
        });
        
    });
</pre>


maybe that helps a little
  Reply
#16
I've definitely pulled my hair out on doing that sort of thing. A lot of it depends on HOW you are getting all the other options. I have a work order system that asks you to choose if the work order is for a building or vehicle. Then if you choose building it wants to know what section of the campus it's in. Then once you choose that, it gives you a list of the buildings in that area. My solution is a hack job but it works....

It's a lot of hiding and showing divs with js at the bottom.

https://hastebin.com/ifovujewey.xml
  Reply
#17
Mudmin, if you don't mind, can you throw me the structure of your tables related to this page? I want to play around with it a bit so I can modify it to my use!

Thank you!
  Reply
#18
I'll shoot you an email with the schema.
  Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)