Changing settings Mikrotik settings ad-hoc with Captive Portal

I have a wireless mikrotik device (hAP ax2) that I want clients to use as a station to a modem with internet connection. However, I want the configuration to be done when installing the mikrotik, assuming that I don’t previously know the Wi-Fi SSID and password of the modem. The idea would then be for a client to connect to the default SSID of the hAP ax2, and through perhaps some scripting / captive portal be able to input the ssid and password of the modem they want the hAP ax2 to connect to. This process should not require technical experience. Meaning, asking the client to connect to the default SSID would be fine, but asking them to go to a specific ip address is probably too much. How could I do this?