PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How to Generate a Field based on User Input

  1. HI Team,

    I have a form - Online Registration for School It has many fields however the fields I am concerned about are

    Class Student is applied for : Drop Down
    Father's Name : Text
    Mother's Name : Text

    I have to generate Registration ID based on user Input. Format of the registration ID Would be
    First four character for current year(i.e. 2011), First letter from the class applied for drop down (i.e if Nursery then N, if 2nd then II), then a serial no 00001 auto increment, then First letter of Mother Name and last First letter of Father Name.

    Is there any one who can guide me how Can I achieve this?

    Thanks & Regards
    Vivek Saini
    Deecoup

    Posted 13 years ago on Friday February 25, 2011 | Permalink
  2. This would require custom code to accomplish. You would have to use a hook to read the values of the other fields and set the Registration ID value using custom PHP code that does what you want it to do.

    How skilled are you with PHP and WordPress hooks, actions and filter usage?

    Posted 13 years ago on Friday February 25, 2011 | Permalink
  3. I am Fine with PHP If you can just guide me a little bit I will be able to do it?

    Posted 13 years ago on Friday February 25, 2011 | Permalink
  4. I'm going to have one of our developers give a high level overview of how to populate a hidden field based on the value of date selection field. It will show you how to dynamically populate a hidden field with code.

    They are going to add this information to the other forum thread you have started, it applies to both as the same technique would be used. I am going to go ahead and close this one.

    Posted 13 years ago on Friday February 25, 2011 | Permalink

This topic has been resolved and has been closed to new replies.