Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7953029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:02:25+00:00 2026-06-04T03:02:25+00:00

I have this scenario. I have a form A and form B . both

  • 0

I have this scenario.

I have a form A and form B. both of the forms uses a single model. there are 10 fields in the model, all of the fields are Mandatory(Required)..

Form A uses first 5 (1,2,3,4,5) fields of the models and Form B user the remaining (6,7,8,9,10) fields.

So, when I submit form A it asks me for the required fields (6,7,8,9,10) to be filled and the same is the case with form B, it asks me for (1,2,3,4,5) field to be provided. how can I make sure that only those field are considered required which are available on the Form.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:02:27+00:00Added an answer on June 4, 2026 at 3:02 am

    This is possible by using View Models so your views will interact with relevant view model and then view model will interact with model. Keep in mind that view models contain only fields relevant specific to model. SO here are steps

    1) Make two view models A with fields (1,2,3,4,5) and B with fields(6,7,8,9,10)

    2) Views will submit relevant fields to their view models then you can submit to model in two ways

    a) On submission of View A Insert first five values and insert next five fields with
    dummy or default values. And when View B is submitted then Update this record’s last
    five values with actual values.

    b) Make another ViewModelAB containing all ten fields without required attribute, Make an object of this ViewModelAB and fill it on the submission of both View Models (i.e. A and B). When all the fields are filled then submit it to actual database model

    Please ask if you need further assistance

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a scenario like this: form = MockRepository.GenerateMock<IAddAddressForm>(); mediator = new AddAddressMediator(form); The
In this scenario, I have 2 or more models: class Store(models.Model): name = models.CharField(max_length
I have one scenario in which I want to apply both form editing and
Think at this scenario: I have a c# windows form application. This application was
i have this scenario. User enter some stuff on jsp form in browser and
I have this form.py: from shortcut import get_timezone class HostCreateForm(forms.ModelForm): def save(self, commit=True): host1
I have this scenario. I want group on Country and Category. A store can
I have this scenario where I would like to redirect my domains using the
Imagine this scenario: You have a desktop and a laptop. The desktop has a
Consider this scenario. I have my own website, that I use as my identifier,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.