You set this (ATtitude mode with ALtitudeHold (better yet ALtitudeVario)) up as a mode on your flight switch. In either case you need to set FailsafeChannel.Throttle to be about +0.4 (40%) (leave the others at 0.0) so it is coming down level, slowly, in AV and so the motors don't stop in AH. Note that the AV throttle stick and this value you are setting always center at exactly 50% = maintain altitude, regardless of what throttle you use for hover. Also note that if you have a very overpowered or underpowered quad, you should adjust some ThrustLimits. Test your mode 3 with the transmitter on to make sure it does what you think, and when you have tested it every other way but in real life, test it low to ground by switching the transmitter off.
Say you have a 3 position flight switch and this is the last position (3). Subtract one from that number (3-1=2) and put that number in the field that @f5soh told you about (FailsafeFlightModeSwitchPosition).
Dangerous: I describe some things to consider, but I can't honestly recommend that anyone actually do this.
Hopefully your transmitter will start to work once you get close and you can shut the motors off that way, but your transmitter might go dead and then...
This is very similar to Landing mode, but you don't get the automatic motor shut off at touchdown, so beware and develop a plan on how to safely get the battery unplugged with the motors still running, perhaps with it thrashing around on the ground or in a tree or long grass. Dangerous to say the least, but I for instance run low powered low RPM quads with plastic props and I would do it (do as I say, not as I do), rather than wait for it to burn up or the battery to be damaged, especially with gloves and a coat on. Remember that you will have Attitude stabilization enabled and it will fight you to stay upright and there may be a motor/ESC acting like fireworks when you do it.