Skip to content

Commit

Permalink
test pages url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ser-gi-o committed Aug 16, 2020
1 parent cfd15ea commit 672176e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 38 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ frontend framework or amount of fields in form.
`composer require srg\yupforms`

#### Database
`php artisan yupforms:migrate`
`php artisan migrate`

## Admin
YupForms Admin comes with CRUD functionality for forms(YupForm) and form submissions (YupFormData).
The admin frontend was built with bootstrap, jquery and datatables.net.

#### Route
Yupforms route /yupforms
Yupforms route /yupforms/yupform


#### Events
Expand Down
56 changes: 32 additions & 24 deletions src/views/admin/form/partial/edit-embed.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h2 class="">Embed</h2>

<div class="container m-2 pb-4" id="#html">
<div class="container m-4 pb-4 border-bottom" id="">
<div class="">
<h4 id="#html">
Form Action Url
Expand All @@ -11,33 +11,41 @@ class="form-control"
</div>
</div>

<div class="container m-2" id="#html">
<div class="">
<h4 id="#html">
Html
<span class="ml-3" style="font-size: .7em;">
(<a href="{{ action('\YupForms\Http\YupFormController@testPage', ['publicId' => $yupForm->public_id]) }}"
target="_blank"
class=""
>
Test Form <i class="fas fa-external-link-alt small"></i>
</a>)
</span>
</h4>
<div class="container m-4 pb-4 border-bottom" id="#html">
<h4 id="#html">
Html
<span class="ml-3" style="font-size: .7em;">
(<a href="{{ action('\YupForms\Http\YupFormController@testPage', ['publicId' => $yupForm->public_id]) }}"
target="_blank"
class=""
>
Test Form <i class="fas fa-external-link-alt small"></i>
</a>)
</span>
</h4>

<label>
This is an example. Add as many fields as necessary for your form.
</label>
<textarea name="htmlTextArea"
{{-- oninput='this.style.height = "";this.style.height = this.scrollHeight + 3 + "px"' --}}
style="width: 100%; background-color: #e9ecef;"
rows="8"
readonly
>@include('yupforms::admin.form.template.html', ['publicId' => $yupForm->public_id])</textarea>
<h5>Special Field:</h5>
<div>
To specify page after submission add hidden field _next to form. Otherwise will be standard yupforms result page.
<textarea name="htmlTextArea" class="d-block bg-light"
style="width: 100%; background-color: #e9ecef;"
rows="1"
readonly
><input type="hidden" name="_next" value="{{ request()->getSchemeAndHttpHost() }}"></textarea>

<label>
This is an example. Add as many fields as necessary for your form.
</label>
<textarea name="text"
{{-- oninput='this.style.height = "";this.style.height = this.scrollHeight + 3 + "px"' --}}
style="width: 100%; background-color: #e9ecef;"
rows="8"
readonly
>@include('yupforms::admin.form.template.html', ['publicId' => $yupForm->public_id])</textarea>
</div>
</div>

<div class="container m-2" id="#html">
<div class="container m-4" id="#js">
<div class="">
<h4 id="#ajax">
Javascript ajax
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin/form/template/ajax.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$formId = $publicId . 'form';
$formMessageId = $publicId . 'form-message';
?>
<form action="https://dp.mailflagger.com/yupform/{{ $publicId }}" id="{{ $formId }}" method="POST">
<form action="{{ action('\YupForms\Http\YupFormController@submit', ['publicId' => $publicId]) }}" id="{{ $formId }}" method="POST">
<label>Email</label>
<input type="email" name="email" required>
<label>Message</label>
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin/form/template/html.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form action="https://dp.mailflagger.com/yupform/{{ $publicId }}" id="{{ $publicId }}form" method="POST">
<form action={{ action('\YupForms\Http\YupFormController@submit', ['publicId' => $publicId]) }}" id="{{ $publicId }}form" method="POST">
<label>Email</label>
<input type="email" name="email" required>
<label>Message</label>
Expand Down
10 changes: 0 additions & 10 deletions src/views/admin/form/test-page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,4 @@
@endif
@endif

<h3>test next</h3>
<form action="https://dp.mailflagger.com/yupform/2732873" id="2732873form" method="POST">
<label>Email</label>
<input type="email" name="email" required>
<label>Message</label>
<input type="text" name="message">
<input type="hidden" name="_next" value="https://yuphub.com?mailflagger=hello">
<button type="submit">Submit</button>
</form>

@endsection

0 comments on commit 672176e

Please sign in to comment.