Accepting Terms Of Use

Home Forums Ticket Products Community Tickets Accepting Terms Of Use

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1022841
    Kevin
    Participant

    I need to create a field where the user accepts the Terms of Use. I’m trying to do this through Additional Fields and I have 2 questions about it:

    1) is there a way to add a link within the text of the Field Label? for example, It would be good to have something like this:
    I accept the Terms of Use [checkbox]

    I have tried using the Terms of Use in the Field (which worked on my previous theme) but it doesn’t work here.

    2) Right now on the Submit Events form, the Cost is the last block before submit. How can I move the custom fields to be last block so the very last think the user sees is the Accept Terms of Use.

    Thanks again.

    #1022847
    Kevin
    Participant

    I should also mention that i have tried the solution provided in this thread but nothing has happened.

    #1022992
    Cliff
    Member

    Hi Kevin.

    If I’m understanding you correctly, I think you’ll need to follow along our Themer’s Guide.

    So you’ll want to go to your current theme (ideally a child theme) and create a folder structure like this:

    • /wp-content/themes/YOUR-CHILD-THEME/tribe-events/community/src/views/community/edit-event.php
    • /wp-content/themes/YOUR-CHILD-THEME/tribe-events/community/modules/custom.php

    Copy the /wp-content/plugins/the-events-calendar-community-events/src/views/community/edit-event.php file to that first location above and then make your edits to it.

    Screenshot 2015-11-08 00.39.48

    For example, you could re-arrange the order each module is loaded (e.g. put custom below cost).

    And copy the /wp-content/plugins/the-events-calendar-community-events/src/views/community/modules/custom.php file to the second child theme location mentioned above, then make your edits to it. For example, you could search for esc_html and sparingly remove it where absolutely necessary (it strips HTML, like links, but it’s there for security reasons, not simply to be annoying). And/or you could add do_shortcode() around the $options so you could use shortcodes in your Additional Fields options.

    Finally, you might be interested in the tutorial how to make certain fields required on the Community Events form: https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/

     

    I hope this information clears a few things up for you and gets you headed toward a good, long-term solution!

    #1023210
    Kevin
    Participant

    Thanks for such a thorough response. I have tried these – but not change is reflected on my site. I have noticed that Theme Overrides don’t seem to be working anymore. I found this thread but it pointed to needing an upgrade – which is not my issue. I think i’m running the latest version. i’m not sure what is happening but when I have tried this solution in both my child theme and main theme directories and neither seem to work now. I even tried a simple text change on a return error message and it doesn’t seem to override correctly. i’ve noticed this with other support threads i’ve posted as well. not sure what i’m doing wrong. any insight here would be greatly appreciated.
    thanks again.

    #1023218
    Kevin
    Participant

    Further to my last response. I was able to successfully change the title of ‘Additional Fields’ which proves that oveerides are working. i’m just not sure why the solutions you have noted about aren’t working. i’m sure it’s something simple that i’m overlooking.

    #1023257
    Cliff
    Member

    Sorry you’re having trouble. I know it can be frustrating sometimes.

    Changing the title of Additional Fields means you’re successfully editing /wp-content/themes/YOUR-CHILD-THEME/tribe-events/community/modules/custom.php

    I’m guessing you have edit-event.php in this SAME folder, which is incorrect.

    You need to have it 1 level up, like this: /wp-content/themes/YOUR-CHILD-THEME/tribe-events/community/edit-event.php

    Let me know if this clarified things for you and got it working.

    #1023323
    Kevin
    Participant

    okay thanks. that seems to have worked to change the order of the custom fields. i’m still not able to add a link to the additional fields through the custom.php file. i have tried to remove esc_html from the following section as it is a checkbox i wanted to add but that doesn’t seem to do it. I have also tried replacing the esc_html with do_shortcode but still nothing. not sure if i’m on the right track or not.

    } elseif ( $customField['type'] == 'checkbox' ) {
    	foreach ( $options as $option ) {
    		$values = ! is_array( $val ) ? explode( '|', $val ) : $val;
    		?>
    		<div>
    			<label>
    				<input type="checkbox" value="<?php echo esc_attr( trim( $option ) ); ?>" <?php checked( in_array( esc_attr( trim( $option ) ), $values ) ) ?> name="<?php echo esc_html( stripslashes( $customField['name'] ) ); ?>[]"/>
    				<?php echo esc_html( stripslashes( $option ) ); ?>
    			</label>
    		</div>
    		<?php
    	}
    #1023557
    Cliff
    Member

    Kevin, maybe you could reference https://theeventscalendar.com/support/forums/topic/add-text-to-community-event-submission-form/ and just add your own new/separate area to display either the full terms (possibly in a scrollable text box) or just an actual link to the full terms.

    You can still have a checkbox like you want, it just won’t have (and won’t need to have) the link to the Terms, since the link is right above the custom fields.

    Just a thought. If it’s not the direction you’d like to go, I’d suggest adding a link to the terms via JavaScript / jQuery. The additional fields are plain text, not HTML, as you’ve seen. In my opinion, I’d prefer not to be removing security measures simply to enable a link to the terms.

    Let me know how it goes.

    #1023758
    Kevin
    Participant

    Thanks again for all your help on this. one thing i have just realized is that by making the Terms and Conditions an ‘Additional field’ it now show up on the event page under ‘Other’. How can id prevent that field from displaying on the event?

    thanks again.
    Kevin

    #1024001
    Cliff
    Member

    Kevin, you could add some CSS like this:

    div#event_custom table#event-meta tr:nth-child(3) {
    display: none;
    }

    Change the number ‘3’ to whatever works for your setup (#1 “Additional Fields”, #2 is the first custom field, #3 is the second custom field)

    Let me know if that accomplishes what you’re looking to do.

    #1075517
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Accepting Terms Of Use’ is closed to new replies.