none
How to Autopopulate values in TextBox from other textbox value in NewDoumentSet.aspx (SharePoint)

    Pregunta

  • In NewDoumentSet.aspx , there are 2 date time  controls, if user enter  date time value,  other date time control will be automatically populated from  the first one .

    PS : We cannot able to use a calculated field

    Please suggest any workaround

    lunes, 19 de marzo de 2012 14:24

Respuestas

  • Requirement will work exactly with this JQuery function

    $(function() {

            $('input[title= "Decision Date"]').blur(function() {

                $('input[title= "Date of All Conditions Met"]').val(this.value);       

            });

            });

    • Marcado como respuesta SP Support miércoles, 21 de marzo de 2012 6:10
    miércoles, 21 de marzo de 2012 6:10

Todas las respuestas

  • use the Jquery to achive the above functionality:

    $(function() { 
        $("input[title='A']").change(function() { 
     $("input[title='B']").val(this.value); 
      }); 
     }); 
    

    Please check the below link:

    get the textbox value and setting value

    http://www.mkyong.com/jquery/how-to-get-textbox-value-with-jquery/


    MCTS,MCPD Sharepoint 2010. My Blog- http://devendra-sharepoint.blogspot.in
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful

    • Marcado como respuesta SP Support miércoles, 21 de marzo de 2012 6:10
    • Desmarcado como respuesta SP Support miércoles, 21 de marzo de 2012 6:17
    lunes, 19 de marzo de 2012 15:41
  • Thanks for your reply.

    I tried this code but not working

    $(function () {
            $("input[title='Decision Date']").change(function () {
                $("input[title='Date of all conditions met']").val(this.value);
            });
        });

    This page is SharePoint OOB page (NewDocSet.aspx). Even i tried with FieldInternalName also.

    martes, 20 de marzo de 2012 3:24
  • Hi Devendra,

    Below function only works when user enter the Date using Keyboard. but selecting date using the Calender Image it is not working

        $(function () {
            $('input[title= "Decision Date"]').change(function () {
                $('input[title= "Date of All Conditions Met"]').val(this.value);
                alert(this.value);
            });

            });

    Thanks

    miércoles, 21 de marzo de 2012 3:45
  • Requirement will work exactly with this JQuery function

    $(function() {

            $('input[title= "Decision Date"]').blur(function() {

                $('input[title= "Date of All Conditions Met"]').val(this.value);       

            });

            });

    • Marcado como respuesta SP Support miércoles, 21 de marzo de 2012 6:10
    miércoles, 21 de marzo de 2012 6:10
  • Hello SP Support,

    I am trying to add script to newdocset.aspx page. How did you achieve this. can you share. I copy pasted the newdocset.aspx file and renamed it. In designer i am pointing to that newly created form. Now, i need to add script to that file to do some validations.

    Thanks,

    Alex

    martes, 05 de febrero de 2013 19:59
  • Alex,

    You can add javascript\jquery script in master page or you can write in newform under any <asp:Content >

    ex:


    <asp:Content ContentPlaceHolderId="PlaceHolderBodyAreaClass" runat="server">
    <style type="text/css">
    .ms-bodyareaframe {
        padding: 8px;
        border: none;
    }
    </style>

    <script src="/sites/Style%20Library/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {

            $('input[title= "Start Date"]').blur(function ()
                   {
            
                $('input[title= "End Date "]').val(this.value);
                
            });

            });

    </script>

    </asp:Content>

    Hope this helps

    miércoles, 06 de febrero de 2013 3:06
  • Hello SP Support,

    Thanks for your reply. I have 4 columns in my dataset. ex: col1, col2, col3, col4. Now if col1 is entered then col4 is required field. How would I do this. I need to read the col1 if value (dropdown YES/NO) is YES then required col4. user has to be on the form only to correct the error and proceed with submission. Please help!

    I appreciate your time and help.


    Thanks,

    miércoles, 06 de febrero de 2013 14:03