Ah okay. Well yep, what you've said is the right way to go about it (I did a quick Google search and
HTML Form Tutorial: Advanced topics on HTML forms seems a reputable site which suggests this exact method)
And as an FYI (since you said "we dont want the whole website to be https, just certain pages containing the forms" in the OP), it's worth pointing out that once SSL is setup, the whole website *can* be https. It's your choice. As in, if your homepage is
http://www.example.com/index.php, once you have SSL setup you can naturally still use
http://www.example.com/index.php, however you can also go to
https://www.example.com/index.php which will transmit via SSL instead. (Naturally your internal links will be pointing to standard http so it's kind of a moot point, I just wanted to bring it up as an FYI)
So anywhoo, once SSL is setup you can still have the website in standard http as normal - including the page with the form.
Then you (as you rightly pointed out) set the form's action to be https and that'll send just the form's data submission via SSL. (Then the receiving page can put the data into a database as needed).
Hope this makes sense, apologies if not!