using replaceWith() with conditions

using replaceWith() with conditions

Hi everyone,

I've been using jQuery for a while now but I never needed to write something from scratch up until now.

Is it possible to use some if statements to replace (replaceWith()) a form depending on which of the inputs was activated?

The objective is to design a quick survey tool with different forthcoming questions, depending on the ones given.