Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

christian_H's avatar

Show yearly plans by default on registration page

Hello everyone, I feel like this should be very simple and I'm just overlooking something. My project has both monthly and yearly plans. By default the monthly plans are selected when you go to the registration page, but I would like the yearly plans to be selected. I imagine this is pretty easy to do, but all the vue stuff makes everything a lot more complicated than it should be. As it is now, I'm not sure where to start. Can anyone who's better at vue point me in the right direction? Thank you very much!

0 likes
1 reply
christian_H's avatar
christian_H
OP
Best Answer
Level 1

Okay, got this figured out. If anyone else is curious, what I did was edit the selectAppropriateDefaultPlan() function in app.js. I replaced that logic with something like this:

if (this.query.plan) {
            this.selectPlanByName(this.query.plan);
            if(this.query.plan === "Monthly Plan Name" ){
              this.showMonthlyPlans();
            }else if(this.query.plan === "Yearly Plan Name" ){
              this.showYearlyPlans();
            }
          }else{
            this.selectPlanByName("Default Plan Name");
            this.showYearlyPlans();
          }

Please or to participate in this conversation.